MUFF WIGGLER Forum Index
 FAQ & Terms of UseFAQ & Terms Of Use   Wiggler RadioMW Radio   Muff Wiggler TwitterTwitter   Support the site @ PatreonPatreon 
 SearchSearch   RegisterSign up   Log inLog in 
WIGGLING 'LITE' IN GUEST MODE

DIY harmonic wave sequencer / oldschool sampler need advice!
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Author DIY harmonic wave sequencer / oldschool sampler need advice!
lilakmonoke
hi all ... im developing a funky wavetable synth thats inspired by the sequential circuits prophet 2000 from 1985. it uses the original 12 bit ROM from this synth, variable sample rate and and a synthesis method called harmonic aliasing.

- all frequencies and repeat rates are related by simple integer relationships
- adaptive just intonation = infinite tuning systems
- 3 oscillators per voice
- wavetables by multiplexing oscs with waveshaped sines
- variable sample rate simulation via resampling with audiorate wavetables (BLITs)
- integrated complex numeric sequencer
- integrated delay for hardware mixer feedback loop with analog eqs

basically it includes everything i think is cool about numeric sequencing and is still really low on dsp because its all based on integers mechanics like early wavetable synths.

this synth can sound really ambient or real raw depending on the complexity of the number relationships and the waveshaping settings. eventually this is going to be a hardware synth with FPGA technology, variable sample rate per oscillator and analog eqs/filter ... just like in the 80s ;-)

project logo:



prototype patch:



wave multiplexing:



.

harmonic aliasing is inspired by a patch by acreil: https://forum.pdpatchrepo.info/topic/6759/new-anti-aliasing-and-phase- distortion-abstractions.

early discussion: https://forum.pdpatchrepo.info/topic/11176/adaptive-sample-rate-and-ha rmonic-aliasing-in-pd

.

mixer delay feedback loop feature:

[s]http://soundcloud.com/lilakmonoke/a-balinese-christmas-carol[/s]
lilakmonoke
lots of different sounds with audiorate waveshaping:

http://soundcloud.com/lilakmonoke/in-3003-ad-the-prophet-will-become-t he-mountain

there is a long description of why harmonic aliasing works over at the pure data forum. its the reason why the early samplers sound so good to my ears:

https://forum.pdpatchrepo.info/topic/11197/prophet-3003-wavetable-synt h-prototype

Quote:
harmonic aliasing is actually my own term for what im trying to do. here is how i would describe it:

if you repeat 128 samples with a phasor at 128 hz (or 64/32/16/8/4/2) or any multiple of 128 your phasor restarts exactly at the beginning of the wave data and the aliasing frequencies generated by the steppyness of the data will follow the harmonic overtone series 1,2,3 etc. depending on the multiple.

if you introduce another prime divider ie. 3 as in 128 / 3 the phasor will line up with the sample data every 3rd sample and the osc will alias at the 3rd subharmonic frequency which will be somewhat more disharmonic than any overtone.

another way to look at it would be the pattern repetitions. at subdivision 5 the phasor starts at 5 different points in the sample data and its easy to imagine that the readout patterns are all slightly different ... but the whole thing cycles after 5 phasor rounds = 5th subharmonic..

if you subdivide 128 further with a higher prime ie. 563 you will get 562 different sounding samples until nr. 563 lines up again. get the idea?


old samplers generate their sample repeat frequencies by dividing down a master clock and/or by subdividing the number of frames in the wave data - so all frequencies are automatically based on integer relations.

my synth uses both methods explicitly. here is an audio example where you can hear the numbers go from simple to complex and the sound go from clean to dirty:

http://tindeck.com/listen/foyvv

.
.
lilakmonoke
so this prototype is almost finished, now i need advice on how to turn this into a hardware unit:

- the core idea of this synth is precise repetition of stored numbers, down to the single sample level - so it abslutely should have a sample engine with variable sample frequency.

- the only platform that i can think of that does this is FPGA but i have no idea how to program that. any other ideas?

- i could use impulse trains for waveshaping to simulate that but then i have to oversample and filter out foldback frequencies which would be conceptually absolutely wrong. variable sample rate solves all that and adds these frequencies as another harmonic element.

- another idea i had was to actually use a first generation 12 bit sampler with variable sample rate and multiple outs like the akai s900 and feed these into a bela audio platform which generates the wavetables. this works and sounds great in pure data but if you want just intonation out of an s900 things get very complicated quickly.

https://bela.io/

- another oscillator platform would be my SC prophet 2002 sampler which is almost the same hardware as the prophet vs minus the wavetables including analog filters and vcas but 2k$ cheaper.

- but screw all that, it must be possible to build a real sample player with variable sample rate in 2018 if it was done in 1985!

---------------------------------

-- the second main part is the number sequencer. that can easily be done with any microprcessor or the bela platform.

here is an example, that whole track is just made with about 20 integers, a drifting clock and the mixer feedback delay:

[s]http://soundcloud.com/lilakmonoke/golden-yellow[/s]

---------------------------------

- the third part is analog processing of these sounds. right now i run the delay feedback loop through the the analog eqs of my mixer which adds a lot of analog sound to the pure digital mess. bela can also easily generate control voltages and multiple outs so i could add vcas and bandwidth limiting with analog LPF/HPF.

sorry for the long post hope you ćan follow :-)
swhic
nice sounds smile
lilakmonoke
thanks, i think so too, its the ultimate complex loop generator. thats why this synth needs to become a hardware unit ;-)
autodafe
is this PureData? (sorry I am a noob in it...)
lilakmonoke
yes, the prototype is in pure data ... could also be MAX.
swhic
Quote:
thats why this synth needs to become a hardware unit ;-)

Hope so, wish I could help but no tech knowledge here...
smile
windspirit
You could try getting it working on the terminal tedium platform or use a raspi to make in on your own.
Sebo
May be you can try Axoloti:
http://www.axoloti.com/
lilakmonoke
yes nof course the axo is always a possibility. this synth doesnt use a lot of dsp but the axo doesnt have a lot of horsepower so i have my doubts this will work

the bela platform is much nicer for me because it is linux based, and has almost zero audio lag and it can run complied pure data patches ... and its based on a beagle black with a real cpu, not a microprozessor.

none of these support a variable sample rate DAC but FPGA chips run so fast that they can drive a DAC at any sample rate ...as far as i understand.

can somebody confirm that and does anybody here have a clue about how to program a FPGA?



here is an fpga emulating a SID chip, so these things are great for oldschool digital audio i think ,,, exactly what i need!



here it is emulating an OPL3 ... thats exactly the sound im going for. this is not DSP code emulating an OPL3, those are the actual circuits of the OPL3 remodelled in hardware. correct?



.
.
Sebo
I don't understand why exactly are you looking for a DAC with variable sample rate. For sure you aren't using one in PD (the DACs at your sound interface are fixed sample rate), and if you are emulating this in PD, you can do the same in other plataform...
I don't know about FPGA, but getting a DAC with variable sample rate playback will be very rare in modern days...
lilakmonoke
thats a good question .. low resolution wavetable synthesis creates a lot of overtones right up through the audio spectrum and beyond. frequencies beyond the nyquest frequency (24tsd hz on my computer) are folded back as disharmonics.

if you use variable sample rate ie. a wave oscillator with 128 samples per wave at 100 hz = 12800 hz your foldback frequencies start at 12800/2 = 6400 hz
- which is well within hearing range and becomes part of the harmonics of the wave as it will also transpose parallel to the pitch of the sound.

thats why the old wavetabel synths like microwave, prophet vs, ppg wave sound so good: harmonic foldback frequencies!

here is one of the inventors of the prophet vs talking exactly about that:



more discussion about harmonic aliasing:

http://forum.pdpatchrepo.info/topic/11176/adaptive-sample-rate-and-har monic-aliasing-in-pd

.
Sebo
Yes, I know about that effect, I'm actually a big fan of wavetables, I have several modules tha use them.
My point is that doing variable sample rate is very complicated this days, specially if you are doing most of the process in DSP. And if you could emulate it in DSP (like you are doing in PD) will be much easier and cheaper, and may be the difference with the real thing will be minimal...
lilakmonoke
> My point is that doing variable sample rate is very complicated this days

only if you start with fixed rate DSP ... variable sample rate is actually more straight forward because its just like an engine with a gas throttle. if you need more speed you crank up the engine. fixed rate is like running the engine at full speed and using gears to go slower.

variable sample rate is easy with a super fast processor like FPGA and a fast 1bit delta sigma dac, which is just a few components like here a resistor and a capacitor. this is the simplest DAC possible :-)

of course you would need one for every oscillator which is exactly what the prophet vs had.



lilakmonoke
im kind of surprised nobody here has experimented with FPGAs. its really the way to go with digital audio. back to basics but with a lot of horse power!

you have to imagine these things run at something like 20 megaherz which is 400 times the speed of your audiocard. in other words 1 FPGA could theoretically run 400 oscillators with variable sample rate at 48 khz max with sigma delta DACS and seperate outs simply by dividing down that one clock rate. correct me if im wrong ;-)

ive been talking to a developer from waldorf music and he also confirmed that FPGA is the way to go if i want variable sample rate. waldorf know how to build synths so im happy im on the right track.

now im looking for a hardware developer in the berlin area who wants to partner up in developing the most digital hardware wavetable synth EVER :-)
Grumble
I think I did something similar with an arduino, an ad9833 (dds) and a fifo.
The fifo is 256 words of 9 bits, so not exactly hifi Mr. Green
The arduino has a one sine wave-table (and some additional wavetables derived from the VCDO of Electricdruid, with permission).
With the single sine wave I calculate different signals by adding odd and/or even harmonic sinewaves with different amplitudes.
Then I upload the calculated wave into the fifo and read the data out to a DAC. The clock signal for the fifo and the DAC is made with a DDS (AD9833).
By using full harmonics in calculating the waveform for the fifo, I avoid fast jumps in the signal caused by cutting a sinewave.
HERE a short video of this module.
lilakmonoke
interesting! i cant say i fully understand what you are doing but i love your "arduino infested" modular, especially the neat lettering ;-) i always want to start a label with only music from home brewed modulars especially infested ones.

so the arduino istnt fast enough to play the wave by itself of its doesnt have enough memory or why are you using wave data instead of calculating the sines in real time?
Grumble
The arduino is fast enough to play a waveform, but it has some drawbacks:
For playing a wave form consisting of 256 bytes at 440Hz, you need to clock the data to a DAC at a rate of 256x440= about 113 kHz, and double that since I'm using 9 bits which is doable, but as the sample frequency increases the inaccuracy increases too.
There is a work-around by decreasing the number of samples, but then the aliasing gets worse.
The module I have made is capable of playing wave forms well above audio range.
So all the arduino does is filling the FiFo with data (be it calculated or from a wavetable), set the DDS to the (very accurate!) clock frequency and that's it.
When this is done, there is all the time in the world Mr. Green to handle the midi, look at the switches and change the pitch (when necessary ).
lilakmonoke
i just had a look at the specs of your direct digital synthesis component and now im getting it! this thing can go up to 15 Mhz which is in the same range as a FPGA.

so there is a memory location in the DDS for the wave data which is being repeated by the chip according to whatever frequency you send it? thats definitely a possibility for my synth but i need three of these for each voice and i have to mix these oscillators somehow dynamically ... and i need variable wave memory (1 byte -
128 byte)because the aliasing of the waveform is part of the sound.

but programming the arduino is probably a lot easier than programming everything into the FPGA. my synth has a fairly complex sequencer and interface part so thats something to be considered.
Grumble
FPGA's are way out of my comfort zone (don't know nothing about them) and that's why I use the cheap Arduino clones.
The DDS can put out three types of wave forms (sine, triangle and square wave), alas not at the same time...
In this module I just use the square wave, since I just need a clock signal (this time cool )
HERE you can play with the several DDS from analog devices, it is an online tool.
ablearcher
Variable sample rate DAC should be doable. you see variable sample rate ADC all the time in the test and instrumentation world. you can always try to make one from scratch, it might get interesting but its doable!

If you want to get into FPGA programming the Altera site has a pretty comprehensive collection of tutorials, they also have a wide range of FPGAs, you might want to do the tutorials first and write the code in a simulator (like the free version of quartus) before spending money on a specific development board. Once you simulate it you have have some idea of the resources required, you may even be able to get away with a CPLD.

FPGAs are sort of a long term project for me, I pick away at the tutorials and occasionally do work with them in a supporting role but keep getting distracted by analog design thumbs up
lilakmonoke
Quote:
The DDS can put out three types of wave forms (sine, triangle and square wave)


that was my question. are the waveforms fixed or can they be loaded into some kind of a memory? you just use the square wave to get a clock signal but then somehow play your own waveform? sorry, somehow im still confused. a DDS with arbitrary waveform would be interesting to me indeed.

Quote:
you can always try to make (variable sample rate) from scratch, it might get interesting but its doable!


exactly, you have any real life examples?

Quote:
Once you simulate it you have have some idea of the resources required, you may even be able to get away with a CPLD


CPLD, there is always something new to learn ;-) yes, maybe because all i need is lots of variable speed oscillators with arbitrary waveforms and mixing and separate outs. everything else is probably better handled by a slower microprocessor.
Grumble
The DDS has a sine table in rom so it can't be altered, the triangle wave is just the counter being output to the dac of the dds, and the square wave is the highest bit of the counter, but maybe the attached schematics make things clearer for you?
lilakmonoke
thanks, im kind of lost with schematics im a software guy, unfortunately. here is another BIGed synth, you are definitely the dr. frankenstein from castle arduino! i think this sounds really good but im not sure i understand whats going on here.




here is a good introduction to DDS oscillators. so its basically just a ROM that is being scanned by a phase accumulator. the frequency is generated by changing the increment value of the phase accumulator.

thats exactly what im doing in my prototype but i use euclidian patterns to scan the "rom" instead of a simple increment and for different types of aliasing. in the second part he talks about how to minimize the "side frequencies" that are being generated by the increasing aliasing effect in higher frequencies. i dont want to minimize it i want to explicitly generate that.

so DDS are really interesting but i need them with RAM so i can write my own wave data. are those around?

,
MUFF WIGGLER Forum Index -> Music Tech DIY Goto page 1, 2  Next [all]
Page 1 of 2
Powered by phpBB © phpBB Group