Page 8 of 34

Re: Sonic Crayon GAS!

Posted: Sun Jun 17, 2012 11:46 pm
by kosta
Which one was the Compound? The chorus/vibe?

Re: Sonic Crayon GAS!

Posted: Sun Jun 17, 2012 11:48 pm
by cloudscapes
nah, this thing

viewtopic.php?f=149&t=16986&start=60#p405235

but I think there'd be room for both effects, if I work on the compound a bit more. make it more focused and simpler.

Re: Sonic Crayon GAS!

Posted: Sun Jun 17, 2012 11:55 pm
by kosta
Ah yes! THAT thing. My bandmate and I both want that one real bad. :cool: Super cool stuff man. Definitley still GAS'ing for a MOTH too. :hello: And folks were totally sweating the Hollow Earth on my board at our last gig. "What's THAT thing????"

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 12:24 am
by Bassus Sanguinis
The Compound clips sounded always epic to me! A tasty-nasty pedalcore noise tool I'd really enjoy unleashing on a few songs. I hope it is some time manifesting itself. In form or another. :)

'oh god what have I done'? For starters - the box looks like it'd make an awesome music vid script, too, don't You think: Bad Radar - tentacle - black Hole - fade out. :whoa: :lol: What else can You ask?

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 7:39 am
by cloudscapes
The compound only sounded good with like synths or drums or noises through it. Stuff who's content is either mostly noise, or mostly pure sound with few harmonics. It sounded like shit on guitar/bass, or anything with chords. It was an experiment, and I sort of packed a lot of knobs without exactly thinking how best to use them. It's pretty unwieldy because of that. In the end, I'll redesign it into something simpler, more focused, and now that I know how to use better hardware, better sounding. The next version of the compound is likely to have half the knobs, but each one does its thing much better than before.

The NEW pedal, yet to be named, is kind of something else, though at first listen, it sounds similar. What the new one can be considered as is a weird hybrid cross between the ehx Freeze, ehx Microsynth and a pitch shifter.

It samples a small bit of sound (pluck detected) and loops it back-and-forth in a kind of infinite sustain, down-pitching or up-pitching as it does so. You can make it fade out as well. The sample-size can be varied between about a third of a second down to less than a millisecond. You can adjust the "record" sample size and "playback" samplesize independantly for weird stuttery effects. Play a note on largest sample size, let it hold and turn the size down for instant adjustment, play other notes on top of the smaller size, let it hold, and readjust the size to big again and you'll hear the *old* note bleed in again. That kind of stuff.

With wet at 50% and fade at a couple seconds, you make it sound like a cool pitch-bent granular delay. It doesn't have to fade though, it can sustain indefinitely, (untill the next pluck/sound detect). When pitching up, you can make it go up one octave. When down, either one octave or six. Pitching can either take less than a second at the fastest, or minutes at the slowest. Same with fade.

It samples at 22khz 12bit, so unlike the compound (5khz 8bit), it is high fi enough for complex chords and sounds. It darkens the sound a little bit.

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:09 am
by kosta
That sounds very cool.

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:20 am
by hclapp219
kosta wrote:That sounds very cool.

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:38 am
by cloudscapes
The project also served as a learning excersise for this new kind (much more powerful) of hardware I use. Maybe diving head-first into that looper project I posted a couple pages back wastoo ambitious as a first project on this hardware, so I did this instead. Much much simpler, code-wise.

Here's the source code for this new one, btw:
http://nearworlds.org/stuff/alien.html

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:46 am
by kosta
Interesting. That code looks fun! JS based?

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:49 am
by cloudscapes
embedded C

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:50 am
by cloudscapes
first time I do C, too. all prev. projects were in Basic on different hardware

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 8:56 am
by kosta
Interesting. Just looking at it really quickly it's cool how the pots are objects in the code. Mikro IDE is the platform?

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 9:19 am
by cloudscapes
Well it's not object based (not really). Well, maybe pseudo objects. The pots are variables I define, and the InitADC and GetADC routines are there to sample any one pot and give it a number between 0 and 1023. It's a lot of configuration. After that, because pot-adc sampling isn't instant, I tell it to first initialize a certain pot's adc, then later read the value. All this without interrupting the audio, so I have a system of timers and counters.

The IDE's own pot-sampling library would be much simpler, code-wise, but also less flexible. It created pauses and glitches in the audio because it would force the entire program to wait (audio included) while it waited for the pot value.

The ADC_Input routine is how the controller talks to the external audio adc, assuming it's wired up properly. Much faster and better-sounding than the controller's internal adcs I use for pots. DAC_Output is the routine to talk to the external DAC. Both of these use SPI configuration later in the code. SPI2_Init_Advanced, SPI3_Init_Advanced.

I use two timers. One is at the audio samplerate and does the Sampling_loop. This handles the pure audio transfer/storage and anything else that requires it to change the audio at a per-sample resolution. The other is much slower, every 1 milliseconds and does UI_Functions. Stuff that isn't as crucial for speed, like sampling the pots, checking toggle switches or heavy arithmetic. On other projects (like the hollow earth), controlling/updating a display would go here too. Once every thousandth's of a second is plenty. Overkill, even. The reason why I get it to do this stuff only "occasionally" is that it uses up precious CPU cycles. Doing it in the main sampling loop every 22050'ths of a second would probably force me to lower the sampling rate so as not to bog it down.

basically:
Step 1: Configure the SPI busses. Communication lines between controller and external ADC and DAC.

Step 2: Configure other pins used by the micro. Toggle switch is here, other thing is there, etc.

Step 3: Configure the two timers.

Step 4: Prepare a 8000 sample memory array. Good for a little more than a third of a second at 22khz.

Step 5: Sample all pots and assing to POT_ variables every few milliseconds.

Continously sample and record audio, but don't play back. If audio levels reach the same peak as defined by the "detect" pot threshold, then do its thing. Different pots defining for how long it samples, how often to recheck peak detect during sample, and other factors. Switch to playback-only and vary the fade amount and pitch-bend as defined by yet more pots. And so on. All the while check for other peaks at all time to start the whole thing over.

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 9:29 am
by phantasmagorovich
Glory Fuck! This sounds amazing.

Re: Sonic Crayon GAS!

Posted: Mon Jun 18, 2012 10:05 am
by Eric!
Oh man, I should start using microcontrollers. I know how to program C. It'd just be a matter of patience. A LOT of patience, of which I have not so much.

Updated Compound idea is EXCITING.