electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
PIC-based fraktal synth
Post new topic   Reply to topic Moderators: State Machine
Page 6 of 8 [195 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Author Message
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2809
Location: New York
Audio files: 24

PostPosted: Sun Aug 30, 2009 12:47 pm    Post subject: Reply with quote  Mark this post and the followings unread

Very clever use of the OSCTUNE function Yerpa !!! Saw the video and agree, the vibrato + plucked strings are very cool !!! Great work ..... Cool

Bill
Back to top
View user's profile Send private message Send e-mail
oootini



Joined: Oct 15, 2007
Posts: 80
Location: ireland

PostPosted: Fri Sep 04, 2009 6:48 am    Post subject: Reply with quote  Mark this post and the followings unread

loaded that new hex last night. pretty fun! is it just me or does the pic synth run a lot quieter since i stuck in the new hex?
Back to top
View user's profile Send private message MSN Messenger
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Fri Sep 04, 2009 8:29 am    Post subject: Reply with quote  Mark this post and the followings unread

thrush, it should be as loud as before. However, it is never loud enough for me, and I am burning thru 9 volt batteries way too fast. My next iteration of this board will be slightly smaller to save PCB cost, but I am adding a transformer-coupled line out jack, and a 9 volt power in jack using the popular stompbox power jack format.

I'm also testing a new extension to the plucked string algorithm, I'll post samples as soon as I get something good.

I'm not impressed with the TDA amplifier chip, can anybody recommend a nice loud class-D amp chip that runs on five to nine volts DC?
Back to top
View user's profile Send private message Visit poster's website
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2809
Location: New York
Audio files: 24

PostPosted: Fri Sep 04, 2009 8:49 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:

I'm not impressed with the TDA amplifier chip, can anybody recommend a nice loud class-D amp chip that runs on five to nine volts DC?


Perhaps you would find one here ? They seem to have a large selection.

http://www.national.com/cat/index.cgi?i=i//303

Bill
Back to top
View user's profile Send private message Send e-mail
oootini



Joined: Oct 15, 2007
Posts: 80
Location: ireland

PostPosted: Fri Dec 18, 2009 11:53 am    Post subject: Reply with quote  Mark this post and the followings unread

i've been asked to help a friend fill a space in a gallery with some sound. i'm thinking of using the pic synth using ldr's instead of the pots to make an interactive piece? like if i had some spot lights on the ldrs and people walked by breaking the light...
Back to top
View user's profile Send private message MSN Messenger
State Machine
Janitor
Janitor


Joined: Apr 17, 2006
Posts: 2809
Location: New York
Audio files: 24

PostPosted: Sun Dec 20, 2009 6:47 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
i've been asked to help a friend fill a space in a gallery with some sound. i'm thinking of using the pic synth using ldr's instead of the pots to make an interactive piece? like if i had some spot lights on the ldrs and people walked by breaking the light...


Nice idea. Sounds like you would just have to tweak it a bit so that the sensor can delineate between when the spotlight is shining on it or when the beam is broken (ambient light). This will in turn determine the amount of change in the sounds the synth is making. Sounds like a cool installation!

Bill
Back to top
View user's profile Send private message Send e-mail
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Fri Jan 29, 2010 10:29 am    Post subject: Reply with quote  Mark this post and the followings unread

As a matter of interest, has anyone tried compiling the PICsynth with one of the 4.x versions of the CCS compiler? I ask because I'm contemplating buying it, partly to work on some additions to the code...

David
Back to top
View user's profile Send private message
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Fri Jan 29, 2010 12:15 pm    Post subject: Reply with quote  Mark this post and the followings unread

I compiled with 3.249, only because I know & trust that version. If you buy the newer versions, I think you can then legally download 3.249 from CCS. Should be no problem compiling with the newer versions, though.

There is a lot of room left in the chip for more code. What are you thinking of adding?
Back to top
View user's profile Send private message Visit poster's website
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Mon Feb 01, 2010 1:37 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hi yerpa,
I planned to mess around with the synchronisation ideas bounced around earlier in the thread. I think I get how the sequencer stuff that catweazle suggested works. I want to try and get a 5v clock going to a PIC pin and use this to step through the sequencer.

In terms of extensions of the synthesis code, I hadn't really thought of that. Yet....

Oh and by the way, I also came across a mention of using the third switch in the source code as a sequencer lock. I hadn't realised there was any algorithm using the third and fourth switches! Any idea how it works?

Have you made any progress on your harmonic pad? Smile I was enjoying your plucked string at the weekend!

Cheers

David
Back to top
View user's profile Send private message
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Mon Feb 01, 2010 2:40 pm    Post subject: Reply with quote  Mark this post and the followings unread

Hello monokinetic,

I haven't done any actual code for the harmonic pad, but I figure I can do about six or eight independent wavetable oscillators at once, each with independent envelopes. I'm basing that estimate on the PIC running about 8 MIPS, gives about 200 instructions per sample. I'm guessing that it will sound gritty, since the independent oscillator values will have to be summed, then bit-crushed back down to an eight-bit value. Also, with 8-bit samples it will help to add dither to prevent cancellations when harmonics get locked out-of-phase. So I am imagining a fuzzy, drifty kind of sound.

Still, it might sound cool and I really want to try it. I'll post it here as soon as I have something.
Back to top
View user's profile Send private message Visit poster's website
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Fri Feb 05, 2010 5:26 am    Post subject: Reply with quote  Mark this post and the followings unread

Hiya,
fuzzy, gritty, dirty sounds perfect to me Smile

One other random idea I had today was to use the remaining free _PIN_aux2 to enable a record of the pots. Once the switch is set, the movement of the pots could be stored. Then once the switch is released the users movements could be "played back". It's just an idea so far, haven't looked at implementation yet Smile

Oh yes, and in the code there is this:
#define _PIN_aux1 PIN_B1 // Lock/Store sequencer

I've got my LED display working now, so exploring the sequencer function. I can't see a description of how to use this lock/store though. Any ideas?

David
Back to top
View user's profile Send private message
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Fri Feb 05, 2010 7:13 pm    Post subject: Reply with quote  Mark this post and the followings unread

monokinetic,

I like the idea of recording the pots. It could work but might slightly reduce the sample rate. The fraktal synth does not run from a sample clock. It just makes samples as fast as it can, all the time. The "birds" routine uses the recording technique you describe, but only on one pot. The second voice is delayed from the first by recording the pot values from the 1st voice into a circular buffer and playing them along later using voice 2. I think the delay can be up to about sixteen seconds.

I don't think pin_aux1 or pin_aux2 are used anywhere in the code. You could use them for anything you want. There are also plenty of catweazle's mysterious programming nuggets that I have not figured out. like what is playtrigger for?

I don't think lock/store is doing anything for the sequencer, either. Here's how I build up a sequence without it:

Use knob 2 to set the speed. The funnest part is using knobs 3 and 4 rocking together to set up a nice little melody. Then let it play while using higher knobs to adjust attack decay, fm parameters, etc. Rinse and repeat Smile
Back to top
View user's profile Send private message Visit poster's website
catweazle



Joined: Feb 25, 2008
Posts: 28
Location: germany
Audio files: 3

PostPosted: Tue Feb 09, 2010 11:32 am    Post subject: Reply with quote  Mark this post and the followings unread

if playtrigger is true then the selected algorithm is initialised in
function APP_TriggerPlay(void)

here you can clear buffers, fill buffers with predefined values etc

It took a while to understand what I've done there long time ago.

APP_InitAlg(void) would be a more comprehensive name, indeed.

Application.c
Code:

#inline
void APP_TriggerPlay (void)
{
   CLOCK        = 1;

   // Fraktal Synth
   FS_cnt       = 0;

   // FM Step-Sequener
   SEQ_step     = 0;
   SEQ_trigger  = TRUE;
   SEQ_clockdiv = 0x7f;

   // WSG

   // XOR

}



these pins are unuesed yet

Code:

#define _PIN_aux2       PIN_B0 // not used
#define _PIN_aux1       PIN_B1 // Lock/Store sequencer
#define _PIN_STORE      PIN_B6 // PGC, Store/Rec
#define _PIN_LEDSTATUS  PIN_B7 // PGD, Status LED


PIN_STORE and LEDSTATUS are free, too.
They are the programming pins but can used for switches
(with pulldown resistor 10k)
Don't forget to open switches on these pins when programming the PIC Wink
Back to top
View user's profile Send private message
catweazle



Joined: Feb 25, 2008
Posts: 28
Location: germany
Audio files: 3

PostPosted: Tue Feb 09, 2010 11:41 am    Post subject: Reply with quote  Mark this post and the followings unread

...
you can connect a 10..25Mhz Crystal at the OSC pins
(with 22pf caps to ground on each crystal pin) and comment the internal oscillator setting out and activate the PLL /Crystal setting (config fuses)

delete this line if using a crystal
#define OSCINTERNAL // use internal oscillator (8Mhz,PLL4 -> 32MHz)


With the internal PLL (x4) you can get the PIC running at 25MIPs (100MHz)
that really works (but some internal periphericals like uart etc may not
function properly. But for this configuration it should work.
(maybe some delay and lower sampling rate of adc is needed)

in case of easy building / minimizing parts and costs,
i used the internal osc.
Back to top
View user's profile Send private message
napierzaza



Joined: Mar 20, 2010
Posts: 4
Location: Montreal

PostPosted: Sat Mar 20, 2010 5:31 pm    Post subject: Reply with quote  Mark this post and the followings unread

I have a few questions, hopefully people are still reading this thread.

What's the most current version of this software?

What is the schematic for this most current version?

What is the minimum I need to breadboard for me to check if it's making a sound?

I ask this because I burned a 18f4620 and setup the VCC,VSS pin 17 and some buttons but it's not really responding. The LED on pin 40 does nothing and I don't get the impression it is functional. At the same time I don't know if it works without wiring the pots or something, which is something I'd rather do after I get the base going.
Back to top
View user's profile Send private message
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Wed Mar 24, 2010 2:35 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
I have a few questions, hopefully people are still reading this thread.

Hiya, welcome on board!

Quote:
What's the most current version of this software?


Well the one I currently have on my PICsynth is called picsynth6.zip from yerpa58. It is in this thread.

Quote:
What is the schematic for this most current version?

I followed catweazle's second layout, with 4 switches and the LED display. I got a bit confused because there are other schematic floating around with output amplifiers/filters etc. The actual stuff to hook up to the PIC is minimal though. The switches by the way should be locking rather than momentary (i.e. I now have toggle type switches hooked up). Hope that makes sense Smile

Quote:
What is the minimum I need to breadboard for me to check if it's making a sound?

The first two switches minimum, the play switch has to be locked on for it to make any sound at all. I'm pretty sure you will need the pots hooked up to get any significant sound, mainly pot 1 controls which synth algorithm is running, but not all of the pots range is used. I have to have mine in the upper half of the pot range to select a synth that makes sound. The LED display is a nice to have, using the sequencer without it is a drag. The fraktal stuff and yerpa's physical model run fine without LED display though.

Quote:
I ask this because I burned a 18f4620 and setup the VCC,VSS pin 17 and some buttons but it's not really responding. The LED on pin 40 does nothing and I don't get the impression it is functional.

I just checked my board behaviour without the pots hooked up, the LED comes on as soon as I apply power. So it sounds like you don't have the PICsynth program running.

Could be various reasons:
PIC is not burnt properly, try flashing it again (how are you programming it? my guess is in a Midibox way because I recognise your id Wink ) Does your PIC burner software allow you to read the chip, verify a burn etc?

You could try one of the earlier builds of the PICsynth hex in this thread just to rule out your hex file, although I think this is an unlikely cause of problems.

Power connections to the PIC would be worth double checking, is your 5v power supply ok? Is it going to the 4 pins that require power (4 pins is from the top of my head, check the PIC datasheet).

How have you got it mounted, is it on a breadboard or PCB etc?

Quote:
At the same time I don't know if it works without wiring the pots or something, which is something I'd rather do after I get the base going.

As mentioned the lack of LED suggests the pots probably aren't an issue here. One thing that got me though was that the output filter from catweazle's schematic (the cap and resistor before the output) made my signal much too low for my headphone preamp to pick up. I probed around before these two parts and got a really loud signal. I liked the distortion here, but probably should tweak the filter here on my board Smile

I'd say once you get the LED showing up that's a sign you can think about pots.

Good luck

David
Back to top
View user's profile Send private message
napierzaza



Joined: Mar 20, 2010
Posts: 4
Location: Montreal

PostPosted: Wed Mar 24, 2010 6:34 am    Post subject: Reply with quote  Mark this post and the followings unread

That's some great info David.

Yes, I'm a midiboxer. I'm using the Midibox Parallel burner. It's actually pretty good, since I had 2 x 18f4620s from my Midibox (SID) project since they now use 4685s. I might be wrong, I've planned on making a SID,SEQ and FM. Since I only made the SID and FM I might have been actually stealing my SEQs PICS but no matter, That's on the back burner.

Unfortunately I didn't document which file I burnt. But since you're saying 6 is the most recent, I'm going to burn again and use 6.

I'm using a breadboard. I smartly thought to do that before making a etched PCB. I know that it's 5v because I've been measuring it, and I have a LED and a resistor directly on the power rails to make sure it's powering up.

I have a number display package, but unfortunately it is common cathode and not common anode. So I need the pic to supply 5v instead of supplying GND. Is this okay? Or would I have to jury rig some kind of transistor reversal?
Back to top
View user's profile Send private message
monokinetic



Joined: Aug 01, 2006
Posts: 100
Location: prague

PostPosted: Thu Mar 25, 2010 7:05 am    Post subject: Reply with quote  Mark this post and the followings unread

Quote:
That's some great info David.

Yes, I'm a midiboxer. I'm using the Midibox Parallel burner.


Always glad to be able to help out a fellow midiboxer Smile

Code:
I'm using a breadboard. I smartly thought to do that before making a etched PCB. I know that it's 5v because I've been measuring it, and I have a LED and a resistor directly on the power rails to make sure it's powering up.


Ok so just to double check, you have got pins 32 and 11 hooked up to VDD, pins 12 and 30 to VSS? The only other thing I can think of is that once I had a problem with a PIC where I had done something strange to the flags (I think that's what they are called). So when I flashed the chip the hex file looked like it had been programmed but nothing worked. I had to totally erase the PIC, then reflash it from scratch and things were fine.

Quote:
I have a number display package, but unfortunately it is common cathode and not common anode. So I need the pic to supply 5v instead of supplying GND. Is this okay? Or would I have to jury rig some kind of transistor reversal?

I'm not 100 percent on this one I'm afraid. Hopefully one of the cleverer folks can help you on this one Smile

Let us know how it goes....

David
Back to top
View user's profile Send private message
napierzaza



Joined: Mar 20, 2010
Posts: 4
Location: Montreal

PostPosted: Thu Mar 25, 2010 7:57 am    Post subject: Reply with quote  Mark this post and the followings unread

Yeah, I'm going to erase/reflash the pics just to make certain.

I hope I can use the existing display I have, I am an avid part recycler and I have about 6-8 of these which I'd love to put to use.
Back to top
View user's profile Send private message
napierzaza



Joined: Mar 20, 2010
Posts: 4
Location: Montreal

PostPosted: Sun Mar 28, 2010 5:07 pm    Post subject: Reply with quote  Mark this post and the followings unread

Okay perfect. I got it working. Apparently pkp (linux pic burner) is pretty weird about loading files. Looks like it's working perfectly, except the audio portion is kind of useless. I'm not sure what it's supposed to do, it just destroys the audio.
Back to top
View user's profile Send private message
okvern



Joined: Feb 05, 2008
Posts: 78
Location: Seattle, Washington
Audio files: 5

PostPosted: Tue Mar 30, 2010 8:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

Fellow Builders,

Some of you might recall The Oscillator from earlier in this thread (he's tall, dark, and noisy). After "performing" with him a few times, I realized that what what he really needed was a rhythm section. I pretty much forgot about this, until I saw the VS1053 breakout board at Sparkfun.

The VS1053 is a fascinating chip: all kinds of sample decoding and a general MIDI synth, all in a tiny, battery-compatible package. At the time I picked up the board, they were selling for $19--only a little more than the chip itself.

The attached video shows an Arduino MIDI sequencer I wrote running three channels of MIDI (drum, bass, and groovy organ) on the VS1053. I still need to add controls (because a simple sequencer is kind of dull) and package it up so that it'll fit in The Oscillator's control box.

Thanks,

Ole


VS1053.mpg
 Description:

Download
 Filename:  VS1053.mpg
 Filesize:  3.76 MB
 Downloaded:  861 Time(s)

Back to top
View user's profile Send private message
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Sat Jun 19, 2010 10:09 pm    Post subject: Reply with quote  Mark this post and the followings unread

I made a few changes to the sequencer. Now the switch on Port B1 (Pin 34) is a Step/Run function. In the step mode, pot #3 steps thru the sixteen steps. The switch on Port B0 (Pin 33) is now an Edit/Lock function. Note parameters can only be changed when this switch is in the edit position. There are sixteen steps instead of eight. Each step can have a different sound setting. The settings are saved to the PIC's EEPROM whenever the Edit/Lock switch is returned to the Lock position. That way, the sequence you compose will be saved between power cycles.

Changing the vibrato switch makes all of the envelopes max out for a brief period.

I was starting to add a morphing oscillator preset when I got sidetracked on the sequencer. I hope you like it. The morphing oscillators will be next.

Here's a brief sample of the new sequencer.


fraktal_sequencer.mp3
 Description:

Download
 Filename:  fraktal_sequencer.mp3
 Filesize:  1.79 MB
 Downloaded:  994 Time(s)


xsynth2_files.zip
 Description:

Download
 Filename:  xsynth2_files.zip
 Filesize:  62.84 KB
 Downloaded:  518 Time(s)

Back to top
View user's profile Send private message Visit poster's website
oootini



Joined: Oct 15, 2007
Posts: 80
Location: ireland

PostPosted: Wed Jun 30, 2010 6:45 am    Post subject: Reply with quote  Mark this post and the followings unread

that new additon sounds coool! must try it out. thanks!
Back to top
View user's profile Send private message MSN Messenger
yerpa58



Joined: Mar 08, 2008
Posts: 57
Location: Wisconsin
Audio files: 4

PostPosted: Sun Oct 10, 2010 8:06 am    Post subject:
Subject description: new 2ToneDrone drone preset for fraktal synth
Reply with quote  Mark this post and the followings unread

Hi synth folks,

Just in time for Halloween, I finally got that drone preset done. It is good for eerie ambient sounds. The potentiometer functions are:

pot 0 : Algorithm
pot 1 : Cross Fade Speed
pot 2 : Freq 1
pot 3 : Freq 2
pot 4 : Chorus Offset
pot 5 : Chorus Env Speed
pot 6 : Ring Mod Env Speed
pot 7 : Vibrato Speed (when vibrato is switched on)

In addition to the two oscillators, this "patch" uses four LFOs, a ring modulator, a couple envelope generators, and a dynamic chorus (delay) buffer. It will self-run in a boring way, but it is really meant to be played using the potentiometers.

I was used to hearing it thru the small 3 inch on-board speaker, and when I plugged it into a guitar amp I was pleasantly surprised at all the low frequency stuff that was in there.

This recording was mic'ed right from the guitar amp speaker, no effects added at all. Al the little skritchy sounds are from the nature of the 8-bit signal processing. Sometimes it sounds like it is being played from an old vinyl record. I did not turn on the fraktal synth's vibrato, so the weird little vibratos you hear are from the dynamic chorus buffer.

I'm posting the hex file here in case anybody wants to burn it - I'll be posting the source as soon as I get my web page updated.

Enjoy!


2tonedrone.mp3
 Description:
Just in time for Halloween - a spooky new drone from the fraktal synth

Download
 Filename:  2tonedrone.mp3
 Filesize:  4.89 MB
 Downloaded:  841 Time(s)


picsynth.hex
 Description:
hex file for PIC 18F4620

Download
 Filename:  picsynth.hex
 Filesize:  24.5 KB
 Downloaded:  450 Time(s)

Back to top
View user's profile Send private message Visit poster's website
oootini



Joined: Oct 15, 2007
Posts: 80
Location: ireland

PostPosted: Mon Oct 11, 2010 2:09 am    Post subject: Reply with quote  Mark this post and the followings unread

cool! must get on this!
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic Moderators: State Machine
Page 6 of 8 [195 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3, 4, 5, 6, 7, 8 Next
Mark the topic unread :: View previous topic :: View next topic
 Forum index » DIY Hardware and Software » Microcontrollers and Programmable Logic
Jump to:  

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


Forum with support of Syndicator RSS
Powered by phpBB © 2001, 2005 phpBB Group
Copyright © 2003 through 2009 by electro-music.com - Conditions Of Use