Jump to content

Making sound with a core


mess

Recommended Posts

  generating waveforms in real time on a PIC is... well, challenging to say the least.  Especially if you want ones with rich harmonics and timbres in them.  There's a good reason that wavetables are used.

Who said real time ?

Generating waveforms in realtime is just stupid, because there's no need of it.

I thought of generating the wavetable, when you load the patch, and a patch is just a few parameters need to generate the waveforms.

Do you think store hundreds of waveforms is a clever idea and adapted to the pic's ?

Link to comment
Share on other sites

Feature update: I'm adapting parts of the MB_SID engine for modulation

progress so far:

*one envelope hardwired to volume (I threw out extra features like the envelope bend)

*one lfo hardwired to envelope select, this signal is combined with a manual parameter

*the cc input routines are modified for controlling the coresound parameters

I first wanted to get this to work so there are some modulation sources for the dco...

@Andrew

First of all thank you for the wavetables, I forgot the PM you back

I will try the 'alternate cycle' thing tomorrow...

the interpolation will optional in case this doesn't sound good

I already do this when playing with the formant bank, the 'speakjet wannabe' sounds :-)

@Bill: I like the generator idea but I don't know if there will be enough ram available

the wavetables I'm using right now have 16 waves of 256 bytes each

this is not such a big problem in rom because the actual code is not so big...

maybe this is possible with a pic18f4620

there are so many things I want to try but the resources of the pic are running out fast...

maybe there should be a pic generating the sounds and another one for modulation/cs

just like all of the other projects around here

I would love to use the whole (modified) SID software for controlling this thing

If someone wants the code to try out some ideas PM,

I don't want to post the code until it is cleaned up a bit

please note that you can also use the standard R2R resistor dac for a quick experiment ;-)

Link to comment
Share on other sites

there are so many things I want to try but the resources of the pic are running out fast...

maybe there should be a pic generating the sounds and another one for modulation/cs

just like all of the other projects around here

I would love to use the whole (modified) SID software for controlling this thing

I'm impressed that you have it working as well as you do while running on the same PIC as the modulation/CS!

If you moved the sound generation to its own PIC, that would free up a lot of resources on both sides.  The downside, of course, is requiring an additional PIC and PCB.  Communication could be over a parallel bus, '595-style shift registers (a la SID), or possibly I2C, since that has already been implemented on MIOS.  If you went with a monodirectional (ie Core->Voice only) connection over I2C, you could probably get a whole bunch of boards running at the same time (though that probably wouldn't be cost-effective).

Link to comment
Share on other sites

If you moved the sound generation to its own PIC, that would free up a lot of resources on both sides

That is exactly what I'm going to do next, TK suggested using the new MBNET (CAN network)

so right now I'm adapting the MBNET driver for use with coresound...

I've made a WIKI page so that all information can be added there:

http://www.midibox.org/dokuwiki/doku.php?id=coresound

there's not much info right now, I will update the page as the code progresses

Michaël

Link to comment
Share on other sites

Hi Guys,

I was browsing the forum today (it's been a while) and found your thread. That's kind of funny as I'm currently working (slowly) on a similar idea except that I'm using the propeller and I, indeed, considered as well that it would be better to dedicate the CPU purely as an audio engine and rely on the MidiBox to control the various sounds.

As you may know, the propeller has 8 CPU built-in. My current implementatioin requires 1 CPU per voices (so  I can manage up to 7 voices + a controller/interface). One voice is a combination of 8 waveforms, with various modulation and a resonant filter.

If some of you are interested, check on

http://www.digital-art.rd-logic.com/Projects/ProperSound/news.html

I published a diagram of the engine.

If anybody is interested working on the application to be developped on top of MIOS that would be great. I was planning to make the communication interface compliant with the current SiD interface.

Let me know,

Richard

Link to comment
Share on other sites

Freon that's a very interesting project. Seeing as you are going to control it with a midibox front-end, might I suggest that you create a thread in the user projects section of the forum?

I would imagine that you've been very busy working on this, have you noticed that the 'new' 'current' sid interface is now the CAN bus (MBNET)?

I'd certainly be interested in helping with the midibox side of this, until you make the new thread I will suggest in here, that you drop to 16-bit depth and stay at 44100 instead of 32 bit at 22050. I also think that it would be more useful to have less oscillators and use the cycles to have a 2nd filter/mixer/more modulation.

But yeh, back on topic :)

Link to comment
Share on other sites

Hy Strid,

Not sure it deserves a thread. Just found funny that mess was working on a similar idea.

Tks,

Richard

PS: 32 bits is for the math as I'm not using floating points, I agree a 32bits DAC is pointless, but well, it's available for free. 22050 is because the CPU is "lacking mutiplication" so a lot of CPU cycles are wasted there. Propellerv2 should have it.

Regarding the interface, I meant from the core to the 6581. So yes, if the core support CAN, let it be with CAN.

Link to comment
Share on other sites

Hi Freon,

it just had a look at your site, I agree with Stryd, very nice interesting project...

do you write your code in Spin or ASM?

about the Sid Control Engine:

in the current implementation CAN is only used for the CS and patch loading

I was planning to make the communication interface compliant with the current SiD interface.

I don't think this will be very useful considering the different synth architecture...

also the SID code has a lot of specific code to handle the low resolution sid registers

Maybe a more generic control engine based on thr SID would be nice,

as there is a lot of intrest for controlling all kinds of soundchips

Right now I'm working on the MBNET code to copy the variables from the control chip

to the sound engine.

Hopefully I can show some results monday...

If you want a very simple way to get rid of most of the attack click

you could try smoothing the gate signal, I just used an averaging filter running at 1khz (control update freq)

and it helped a lot...

keep us informed about your project  :)

Michaël

Link to comment
Share on other sites

Hi Michael,

To manage 22kz, I had to implement the engine in asm. The basic sequencer is in Spin. Current ADSR is a dummy 80%, 100%, 70%, 30%, 0% with tempo. Yep, it's currently clicking badly, but I'm planning to have this controlled by a core module, I'm sure I'm better of re-using some of the work you're doing  ;)

MBNET will be manage by the core right ? So I just need to find a simple communication between the core and my Propersound. Looking at the current CORE schematic, I thought that using the same interface as for the SID module was good enough. I'm going to expose  my engine's register, just like the 6581 is doing. What alternative would you recommend besides J10 ?

Tks,

Richard

Link to comment
Share on other sites

There is a difference between the standard use for MBNET like in the sid application

and the usage for my project

I'm using MBNET to transfer all the parameters from the control chip to the soundchip

so every parameter is buffered in the control chip, and every time the control routine is executed

the parameters are updated via MBNET (RAM WRITE) to the sound engine

so both chips need the CAN interface

the standard mbsid v1 MBNET usage exchanges parameters between control engines

for the control surface

If the propellor doesn't support can you might indeed be better off

with another communication method

Link to comment
Share on other sites

Sorry, that I answer so late. Why I don't get a mail when something's posted here...

@mess: At the moment the R2R-Ladder-Network DAC performs best. You don't need any filtering at the end, but a buffer OpAmp. To be 100% correct you need to shift the voltage from the range 0 to 5V down to -2.5 to 2.5V. If you only use speakers or headphones, this is no problem...but if you want to record it

For the IC-DACs I use a simple LP-Filter (Capacicator to ground and an OpAmp to raise the level again)

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...
  • 2 weeks later...
  • 3 months later...

This is very interesting to me.

I've been looking for a way to drive a click track for live drumming with a sequence. I have been using a headphone amp, connected to outputs from a USB/FW soundcard, via VLC (very loong cable) :P The trouble with this is it takes an output from the soundcard. THAT means that the sequence is in mono! One channel to me, one to front-of-house mixer. One solution is to get a soundcard with more outputs, but since most external boxes have MIDI anyway... this is ideal! I'll keep the headphone amp, but jam a core into it. Sweet!

Link to comment
Share on other sites

  • 4 weeks later...
  • 5 months later...
  • 1 month later...

...generating waveforms in real time on a PIC is... well, challenging to say the least.  Especially if you want ones with rich harmonics and timbres in them. 

Howdee, sounds like someone has managed to rise to that challenge. I just listened to a sample demo of a minimal component PIC based project that sounds most interesting. The 8 knob device is known as Catweazles Fraktal Cellular Automata Synth.

Quoted from the thread over at CircuitBenders.co.uk:

- 8bit/1Bit:

  Sound is calculated with 8Bit resolution, the PIC-microcontroller works internally with 8bit wide data/registers.

  Sound is outputed via pulsewidth modulation (PWM), which is 1Bit output but 8x oversampled.

  At the moment, you get 4 different synthesizers/noisemakers in one microcontroller/box.

  - Two fractal based "music" generators ("predictive digital music synthesizer",  it's not random!)

  - Step-sequencer (8 steps) with FM(frequency modulation) tone generation

  - Cellular Automata (1 dimensional, see "game of life", "critterandguitari")

:)

Link to comment
Share on other sites

  • 9 months later...

anyone know where to get the code for this app?  i tried the links and browsed the wiki and didn't see it... 

these links are dead :(  ... and i almost got my core finished... just gotta program the pic! (and find an lcd) w00t!

Link to comment
Share on other sites

  • 3 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...