Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Thu Oct 20, 2016 7:46 am a lo-fi, bytebeat-based synth

EDIT: links added to first post in thread for convenience:

ByteBeater synth, source + 32bit/64bit Windows DLLs

Fnord noise table synth, source + 32bit Windows DLL


I am into chiptunes and lo-fi audio in general, and was poking around some descriptions of Eurorack modules when I was reminded of bytebeat. (In a nutshell, there's a counter "t" that increments by 1 on each clock pulse, some bitwise and/or arithmetic operations are performed on it in an 8-bit unsigned int domain, and the result is used as an audio stream. Try this for example.)

So I thought, why not use bytebeat techniques to make oscillators for a chippy-sounding VSTi? (All experimental, no GUI, not terribly intuitive, unpolished code... I doubt I will enter KVRDC, but I will make some lovely unholy noise with this thing.)

So far I am using the algorithm (s = (t*A) ^ (t*B)), with the option to switch between XOR and AND. The clock rate is determined by MIDI note number. A and B range from 0 to 32, and B also has a fine control for +/- 0.5. Overall it generates anything from 8-bit saws to pleasant/nasty synced weirdness.

Of course I plan to add a few more algorithms: hardsynced squarewaves, a triangle that decoheres into chaos as you detune A and B, a stable but complex waveform generated by XORing phase offsets ((t+A) ^ (t+B)), and a couple of other chaotic interference patterns.

When I convert "s" to float, I also subtract half the envelope level for a bipolar result, and run it through a DC blocking highpass filter.

Polyphony can bet set from 1-8, and Note On messages can optionally reset t for that voice. Envelopes are ADSR (with D/R sharing a parameter as on the Soulsby Atemgatron). The envelope values can be quantized from 1 to 8 bits, which I think is a trick missing from Plogue Chipsounds -- the AY3 for instance had a 4-bit psuedo-envelope-thing on board, and the cascading effect of a release time bumping down through 2-4 bit values is pretty pleasant IMHO.

Possibilities I want to try, in order of appearance in the flow:

-- a stereo unison mode. Double voices and feed them with slightly offset clock frequencies, or slightly different A and B values (but that's risky), or introduce random jitter to t.

-- clock reversal/looping -- possibly at an independent rate (like an LFO), or reset/reverse at a specific value of t.

-- a slew limiter applied to "s" in the 8 bit domain, at the host sample rate. This is in lieu of a lowpass filter, taming some rawness but not too much. (I tried a simple one-pole LPF in the float domain followed by re-quantizing but it sounded ugly, and philosophically I prefer the idea of manipulating "s" anyway.)

-- a bias for "s" in the 8 bit domain, controlled by an LFO independent of t's clock rate.

-- mapping "s" to a sine table, noise tables at different resolutions, etc.
Last edited by foosnark on Sat Nov 12, 2016 10:29 pm, edited 1 time in total.
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Thu Oct 20, 2016 7:51 am Re: a lo-fi, bytebeat-based synth

Eh, and maybe some kind of ridiculous drum mode where the clock rate, or A and B, are tied to the envelope.
User avatar
Sendy
KVRAF
 
5236 posts since 20 Jul, 2010

Postby Sendy; Thu Oct 20, 2016 7:53 am Re: a lo-fi, bytebeat-based synth

I think Chiptunes does quantize envelopes and LFOs, both for pitch and volume. I could be wrong but fairly sure.

Such a synth sounds awesome, though, I would use it, and pay for it if it had a reasonable usability!

I will also test and give you ideas if you like, if my computer is willing to cooperate :borg:
http://sendy.bandcamp.com/releases < My new album at Bandcamp! Now pay what you like!
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Thu Oct 20, 2016 8:20 am Re: a lo-fi, bytebeat-based synth

Hmm, I had thought Chiptunes quantized them to 8 bits... but I admit I tend to make super-basic patches with it that literally just gate on/off with no release time, with single voices, no arpeggiator or wavesequencing or anything, because it's just the loveliest beeps and bass. The website does specifically point out the AY emulation uses a 4-bit DAC though... well then!

Anyway, once I squeeze a couple more things into it I'd be happy to run a beta version past you and see what you think.
xoxos
Mr Entertainment
 
12056 posts since 29 Apr, 2002, from i might peeramid

Postby xoxos; Thu Oct 20, 2016 9:31 am Re: a lo-fi, bytebeat-based synth

i think it was last year i started making some video games using "this" technique, posted a thread on it and stuff. haven't done one with the sd sdk because parsing a string would be much easier with c... thought about implementing a set # of "equations" where values et c. can be varied.

never touched pitching, my "thinking" was one patch per key.

can't remember if there was some sound app, but there's something fairly user friendly already in existence, must've thought the idea could stand some expansion, as i seem to have relegated it to my "this is not yet really available in vst form" stack.

quick note search.... stuff that'll make you feel stupid to go through....


// food sound
o = (fps*((fps+43217)&91)&(fps>>7|fps>>12)<<6) * .0002f;

//s = (sp*(sp&1150)&sp<<1) * .00005f; //1950 juice 1250 gun 1150 original 1550 weird 750 best
//o = ((ies*((ies&1475)|365)&(ies*7))>>14);
o = ((ies*((ies&675)|365)&(ies*7))>>15);

//o = (ss*((ss+43217)&91)&(ss>>7|ss>>13)<<5) * .001f;// awesome weirdo sound
//o = (ss*((ss+7)&1500)&(ss>>4|ss>>11)<<5) * .0002f; spinning record sound
//o = (ss*((ss+9)&3370)&(ss>>4)<<7) * .00001f; 10400 and 10370 instead of3370
//o = (ss*((ss+9)&3370)&(ss>>3)<<7) * .00001f;screeching metal

o = (ss*((ss+9)&3370)&(ss>>4)<<5) * .00002f;

//o = (bh*(bh&1972)&bh<<6) * .0002f; //chinese gong (this means it has rising pitch and they are all probably initialised at a specific value)
o = ((bh*((bh&1582)|365)&(bh*7))>>15);// * .005f;

cb++; cb &= 1023;
tcb = cb + 32500;
o = (((tcb^1967)*((tcb&651)|365)&tcb)>>4) * cbo; //use this
//o = ((cb*((cb&7425)|365)&cb)>>13); // 30000 to 40000 button sound




//o = (unsigned char)(t*((t>>19|t>>8)&7&t>>4));
o = (unsigned char)(t*((t>>19|t>>8)&7&t>>4)); t += t % 155 & (t & 7); t++;//original buzz
//o = (unsigned char)(t*((t>>19|t>>8)&7&t>>4)); t += t % 55 & (t & 17); t++; // tractor
//o = (unsigned char)(t*((t>>19|t>>8)&7&t>>4)); t += t % 55 & (t & 217); t++;

o0 = (ps*((ps+7)&1500)&(ps>>4|ps>>11)<<5) * .002f;



just pasting junk as said, without start vals totally meaningless but maybe the forms will save some fingerlegwork. a few ppl had nice webpages and vids on this. have fun! :)
you come and go, you come and go. amitabha xoxos.net free vst. neither a follower nor a leader be
tagore "where roads are made i lose my way"
where there is certainty, consideration is absent.
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Thu Oct 20, 2016 7:59 pm Re: a lo-fi, bytebeat-based synth

It's coming along. 8 algorithms implemented, 3 more on my to-do-list that require a little more code. (Two of them need another uint8 per voice and I simply saved them for next-to last; the other needs to build a table of permutations.)

The bias LFO didn't work too well, and is temporarily removed unless the table thing makes it useful again.

The 8-bit slew rate limiter is pretty decent, and ironically could be used as a fairly traditional LPF if I hooked an envelope to it. The numeric parameters in some cases are at their coolest, but maybe least musically useful in general, when they're moving around... but with a host default UI, adding modulation parameters gets ugly, and I feel it's best to leave modulation to the host too.

Unison worked best with simple detuning. Stereo clock jitter gave a sort of transparent stereo image that was interesting to hear, but musically the big detuned sound fits the idiom better.

I haven't messed with mapping or clock looping yet.

A couple of these algos, when the main frequency is very low, call for pretty serious transient removal. Like "4 instances of Transient Master in serial" serious. :hihi: I might see if I can clean them up somehow.

A little low shelf EQ might also be helpful on some of these where there's a lot of intricate stuff going on at higher frequencies but SO MUCH bass energy... maybe an inverted form of the slew limiter can do something there, or maybe that will add more weirdness (which is also fine).
camsr
KVRAF
 
6653 posts since 16 Feb, 2005

Postby camsr; Sat Oct 22, 2016 5:56 pm Re: a lo-fi, bytebeat-based synth

Look forwards to hearing it!
Image
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Sun Oct 23, 2016 10:27 am Re: a lo-fi, bytebeat-based synth

A lot of stuff going on here and I haven't made audio demos, but I have a 1.0 version (maybe should have called it 0.9, but whatever) to try out.

http://starthief.net/ByteBeater.zip


No HPF or reverse slew limiter, no transient shaping. No clock looping because honestly I think it's more than complex enough already. I did put in the mapping, which is sometimes useful even though it fights with the slew limiter (mostly in interesting ways though). Also added pitch and slew limiter envelope amount (just feeding off the main envelope though, to keep the number of parameters down).

It's pretty much usable for its main purpose, to make crazy fakebit stuff, so I probably will not sink much more effort into it :)
xoxos
Mr Entertainment
 
12056 posts since 29 Apr, 2002, from i might peeramid

Postby xoxos; Sun Oct 23, 2016 12:08 pm Re: a lo-fi, bytebeat-based synth

this is not what i want to do today.

but bumping this thread and declaring interest in the development is definately on my lunchtime dancecard. will return.
you come and go, you come and go. amitabha xoxos.net free vst. neither a follower nor a leader be
tagore "where roads are made i lose my way"
where there is certainty, consideration is absent.
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Sun Oct 23, 2016 5:35 pm Re: a lo-fi, bytebeat-based synth

Looks like saving parameters with the project and reloading them isn't working, so that's something I've definitely gotta fix.
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Sun Oct 23, 2016 7:35 pm Re: a lo-fi, bytebeat-based synth

OK, I'm not sure what's happening with the parameter states. I'm using JUCE. It seems that getStateInformation() is never called when a project is saved, either in Maschine or FLStudio. Not really finding anything about that in a Google search either... frustrating. :(

Also it took me this long to realize it should probably respond to velocity :hihi:
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Mon Oct 24, 2016 7:20 pm Re: a lo-fi, bytebeat-based synth

OK, got the save bug fixed and version 1.01 is at the link above -- turns out it was an XML parsing failure because I had spaces in parameter names. You don't want to know how much time I wasted figuring that out. :lol:

PHASXOR uses just parameter A for the phase offset, ignoring B.

NOISE also uses parameter A now.

PitchEnv and BriteEnv display a range from -1 to 1, instead of 0 to 1, and the default is 0 instead of .5.

The Reset parameter is replaced with "Notes", which controls velocity response types as well as clock reset. It can apply velocity in the 8-bit domain either as a multiplier or a maximum, or in the float domain after the envelope quantizer, or ignore it.

This quick audio demo uses 7 instances, with a little EQ to roll off sub-bass (did I mention I removed the DC filter? I removed the DC filter) and a little compression.

https://soundcloud.com/fallsastar/bytebeater-demo
User avatar
bitcrusher
KVRian
 
1106 posts since 30 Aug, 2001, from Los Angeles, CA

Postby bitcrusher; Tue Oct 25, 2016 9:40 am Re: a lo-fi, bytebeat-based synth

This is really cute!

Thanks for sharing the source, as I was able to build it a VST on OS X (I can of course share it if you like).

-Steve
tl
KVRist
 
405 posts since 7 May, 2002, from ... , germany

Postby tl; Tue Oct 25, 2016 10:00 am Re: a lo-fi, bytebeat-based synth

great...
a new plugin from foosnark aka fallsastar.
i'm excited...

... and i'll fool around with it as soon as possible.

bytebeat... very nice.
never heard of that term until i came across the bitwiz audio synth app on the ipad.

thanks.

cheers,
tl.
User avatar
foosnark
KVRAF
 
3935 posts since 9 Jan, 2003, from Saint Louis MO

Postby foosnark; Tue Oct 25, 2016 11:10 am Re: a lo-fi, bytebeat-based synth

bitcrusher wrote:This is really cute!

Thanks for sharing the source, as I was able to build it a VST on OS X (I can of course share it if you like).

-Steve


Sure, feel free. It's open source because of Juce.
Next

Moderator: Moderators (Main)

Return to DSP and Plug-in Development

Who is online

Users browsing this forum: CCBot (commoncrawl)