Hi,
I'm just in the process of laying this out on breadboard and I'm a bit confused about the output section. There's 3 schematics in this thread, two from catweazle and one other. Each has a different output section!
The resistors change every time and sometimes the caps are polarised, sometimes not Confusing....
So, my guess would be that the latest schematic from here:
i think the final resistor value doesnt matter so much, i had to leave it out in mine cause the output was low
i think if your using a mixer or something you dont want the output power being too high
the cap on the output section is for a lp filter i think
reckon go with catweasels value to start but seeming your doin it on breadboard you can try different values and hear the difference yourself
A ceramic cap should work fine. I used a different amplifier IC, so I had to tweak some values. It isn't very loud, but loud enough for the small speaker I am using. Incidentally, I have added another algorithm that uses wavetables and a delay line, it sounds pretty cool. I will post the files in the next couple of days. I also fixed a bug in the 8-step sequencer so that the tones ring out instead of a sequence of clicks.
I might think of doing a run of boards if there is any interest. It has been a fun project, thanks to catweazle's excellent ideas.
Hi,
thanks for the replies. Progress is going a bit slower than I expected due to a looming University deadline. grrrr
But yerpa58, it sounds like you have got quite deep into the code! I have had a read through and I was contemplating trying to implement a sync function. Basically I would like to try and integrate this into my modular set up. Ideal would to receive a clock signal and sync the PIC synth. I found the place in the code which generate the timing clocks.
In your opinion, as someone who's obviously been tinkering with the code, is this doable?
There is a lot of space left for code, but the chip is running full speed all the time. Any additional instructions affect the loop timing, which is OK since this thing is not really "tuned" to any particular pitch. I think that a sync signal could be applied to a pin of the PIC chip (within 0-5 volt signal level) and used to generate an interrupt. In the interrupt, the various pointers and counters used by each algorithm could be reset. I have no idea how that might sound! Probably very glitchy, but maybe that would be a good sound.
Are you talking about syncing at audio rates to lock oscillators together, or at slow rates to sync the sequencer?
Joined: Apr 17, 2006 Posts: 2812 Location: New York
Audio files: 25
Posted: Tue Mar 31, 2009 9:32 am Post subject:
Hi Guys !
If anyone would like to submit their PIC based synthesizer music for a radio show "The Soldering Musician" right here on Electro Music radio hosted by me, please jump over to this thread and take a peek at the details. Show times are being worked out and I am in the gathering mode.
Also, spread the word for submissions to others that would be inetersted in having their music played over our radio station ....
Hi yerpa58,
Sorry I missed your reply, I must have accidentally unsubscribed to this thread and thought no one had answered.
I was thinking about the possibility of sync the sequencer which is in the PIC synth (mainly used in the FM synth patch as far as I can tell). Cat weazle mentions some free pins so I was thinking about wiring one up to a clock signal on the modular, then modifying the current code to take the PIC synth sequencer advance from clock pulses on this pin.
Don't know if that makes sense, it's pretty late
I think I'm gonna try it, as soon as my lunetta is boxed
Joined: May 02, 2009 Posts: 1 Location: Austin, TX
Posted: Sat May 02, 2009 11:41 am Post subject:
Hi,
I've built the PICsynth and it mostly works great, except I'm having the same problem as someone earlier in the thread: the FM sequencer mode doesn't seem to work at all. All I get are clicks. If I turn the volume way up, I can barely hear some tones and affect them with the knobs, but other than that nothing. All the other modes work fine, and there's no problem with the wiring, etc. that I can determine. I did use the proper PIC (18F4620) so for the other guy that was having the same problem, it isn't because he used a different model of PIC. I'm using the latest available firmware (PICsynth.hex, dated 4-01-0.
I recommend to use yerpa58 latest Firmware hex, because it is the most up to date one.
About the Step-Sequencer, you have to select a step (with pot2, the display shows the step number), then turn the pitch knob (i think it was pot3) from left limit to right limit (you have to catch the old value with the pot).
then it should make some noise.
Here is a sample from a new algorithm #6 using wavetables and delay in the fraktal synth. I have two wave tables, one is sine and the other is triangle. I use two 16-bit pointers into the tables, one for each voice. Then there are 16-bit tables of note values that are related by the 12th root of 2. There are eight of these tables with the same notes in various orders and octaves. One voice is the lead voice (triangle) and the 2nd voice (sine) follows behind with a delay that can be adjusted (knob) from zero to about 20 seconds. A 2nd knob determines which note table the lead voice uses, and a third knob determines which note table the delayed voice uses. Finally, a 4th knob moves the lead voice back and forth thru its selected note table. A simple slow decay envelope is used for amplitude. That is the only multiply instruction used here. I have three unused knobs in this patch, so I might add envelope control. I like "backwards" envelopes.
I'll post the code soon, but my ISP just locked me out because I mis-typed my passowrd three times! Argggh.
Thanks monokinetic! Here is the code, including the hex file all in one zip folder. I restored the original display cryptics and made a bunch of mods to the sequencer portion, too. Now, you don't have to re-fetch old values to change a sequencer steps, it is always reading the 3rd and 4th pots for step and value info. Combined with the reverse switch, you can quickly put some nice little live forwards/backwards sequences together.
Here is an example of what it sounds like. I'd like to find a better amplifier circuit, like a class D amp, to save battery and make it LOUDER. Must be cheap and simple, though. Have fun!
Weird. Loaded this up last night and to the best of my knowledge, the synths remained the same from my previous version. After the hex loaded I got an error similiar to: "error at line x 00000" message.
Does that mean the hex didn’t load properly?
i definately haven't got anything sounding even remotely like your samples yerpa...
@thrush
it seems that the new hex file wasn't uploaded.
Maybe you have choosen the wrong controller in your upload
Try erasing the chip before programming
@yerpa
wow, thanks a lot for debugging the stepsequencer and inventing
new algorithms. Nice work!
I had implementet the catch the value thing in the stepsequencer because my pots where a bit unstable so the steps changed unwanted.
I hope I'll get my picsynth back soon ... or built a new one if I had some time.
I'm thinking of a arpeggiator alg (often used in chiptunes, well known on many C64 SID tunes).
(Note, this is a continuation of a question I asked earlier in the thread, apologies it's such a delayed reply, school took over for the last month!)
yerpa58 wrote:
Are you talking about syncing at audio rates to lock oscillators together, or at slow rates to sync the sequencer?
My idea was syncing the sequencer section to external gear....
Today I have been looking into the PICSynth code (again!) to try and find a way to do some basic syncing. The original description at circuitbenders.co.uk mentioned MIDI and various other tempting ideas! I'm pretty new to C on Microchips, but I thought I'd try at least....
My plan was to initially just test slaving the PICSynth sequencer to a +5 trigger being sent to a free PIC pin. I can generate these triggers using my MIDIBOX Sequencer. For initial experiments I was going to send a highspeed clock because it seems that the CLOCK variable is being updated every cycle, I guess this is why it is being divided down by 127 internally....
One problem I have is identifying exactly where in the source code I should declare a PIC pin to be an input which I can read for triggers. Any suggestions?
My guess in terms of using the trigger as a clock is that I can put a conditional in the application.c file, section void APP_Task (void) which updates the CLOCK variable each time the sync input pin goes high. Then comment out the CLOCK++ parts under the conditional switch(ALGORITHM).
Does anyone more knowledgeable than me think I'm at least heading down the right path?
I think you are heading down the right path. You will have to look for the transition on the trigger input and use that to advance to the next step. I'd like to take the part of the code where the input pins are read, and move it to the routine where the a/d converter is read so that the pin values are available at any time from other parts of the program.
I don't have much external gear so I'm trying to keep everything self-contained, but I could help you debug and test your idea. I would probably use one of the extra switches to select Trigger Internal/Trigger external.
@thrush:
Like catweazle said, I don't think your hex file loaded. I hope the file is not corrupted, I will try when I get home.
@catweazle:
It has been a pleasure working with this project. Thank you for making the original code and schematics available. I will do the same. For my next experiment on the fraktal synth for algorith #7, I would like to use a timer interrupt to set a precise sample rate to make chromatic tuned notes, probably using the fm algorithm, with a knob for pitch bend. If I find a better audio amp, I'd lay out a new PC board.
Hi yerpa58,
Thanks for the speedy reply and offer of help I guess by now you are pretty knowledgeable about the code!
I'm just throwing ideas around at the moment to be honest, I've got 2 days downtime now before next round of Uni exams, so I won't have much time to do this straight away. But I'll get the trigger out hardware working from the MB Seq this weekend at least. Code experiments to follow after that, expect more questions
In the meantime I'm going to upload your new .hex for some more noises!
All Pins on Port B (PB0..7) can be set up to trigger an interrupt on change. So you can connect the Clock signal to PB2 for example and setup a interrupt service routine that increments the step counter.
But DIN Sync clock is 24pulses per quarter note so that have to be divided by 24
Maybe a switch to select internal/external sync were useful then.
Eventually I'd like to think about sync24, but for the time being I'll just focus on the +5v triggers from my MIDIBOX Seq (which can be configured to do Sync 24 later!)
As I mentioned, I won't get much time to play with this for a few weeks, but those tips already help me to investigate further.
If/when I come up with something useful I'll be sure to post it here for others to share....
Posted: Sun Aug 30, 2009 12:11 pm Post subject:
Subject description: Added vibrato to the fraktal synth code
There is a register in the PIC chip that can be used to adjust the clock frequency up and down. It is called OSCTUNE. I use the second switch (used to be "PLAY") to turn the vibrato on and off. It only sounds good on the "Birds" and "Plucked String" algorithms. Also this version uses the REVERSE switch to invert the envelopes for "Birds".
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum