Project “Synthavr” – A Self-contained Retro Music Studio.

Go To Last Post
111 posts / 0 new

Pages

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Just a hunch but to get the same exact 8 cycle timing as the NOPs try four IN from SPSR0. I'm just wondering if it actually needs the status register to be read? 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, tried that, but no luck.

No big deal, my routines are plenty fast for this project.

 

Brad

 

clawson wrote:

Just a hunch but to get the same exact 8 cycle timing as the NOPs try four IN from SPSR0. I'm just wondering if it actually needs the status register to be read? 

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Looking again at the AVRDB128 datasheet, and the ADC seems very impressive.

130 ksps at 12 bits!

 

Since my base sample playback rate will probably be 32768Hz, this is more than enough.

 

I may also include the ability to record samples.

Being "self contained", I can't import samples from modern equipment, but creating them with the synth is fair game.

I may rig one up and see if the quality is as good as specified in the datasheet.

 

Maybe some kind of old-school vocoder (think... Kraftwerk "We are the Robots") is in the todo list!

 

Brad

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have had mostly thinking time, not much lab time lately.

 

Looking around the Microchip parts selector, I see some of the DSPIC33F series have a 16 bit stereo DAC built in, specifically for audio.

They come in low pin count DIP format, and are under $5.00... seems impressive.

 

Has anyone out there had any chance to try these for audio?

My 12 bit SPI DAC is worth the same amount so if the PIC is decent, it has many other benefits such as faster coms and some ability to add FX in real-time.

 

 

The Audio Digital-to-Analog Converter (DAC) module
is a 16-bit Delta-Sigma signal converter designed for
audio applications. It has two output channels, left and
right to support stereo applications. Each DAC output
channel provides three voltage outputs, positive DAC
output, negative DAC output, and the midpoint voltage
output for the dsPIC33FJ64GP804 and
dsPIC33FJ128GP804 devices.

• 16-bit resolution (14-bit accuracy)
• Second-Order Digital Delta-Sigma Modulator
• 256 X Over-Sampling Ratio
• 128-Tap FIR Current-Steering Analog Reconstruction Filter
• 100 ksps Maximum Sampling Rate
• User controllable Sample Clock
• Input Frequency 45 kHz max
• Differential Analog Outputs
• Signal-To-Noise: 90 dB
• 4-deep input Buffer
• 16-bit Processor I/O, and DMA interfaces

 

If this is as good as it claims, seems pointless to purchase a dedicated SPI DAC with lets bits for the same price.

Makes one wonder why anyone would even produce one that was inferior to a uC of lesser cost really.

 

Brad

No Fate But What We Make!

Last Edited: Mon. Jan 17, 2022 - 05:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

If this is as good as it claims, seems pointless to purchase a dedicated SPI DAC with lets bits for the same price.

Makes one wonder why anyone would even produce one that was inferior to a uC of lesser cost really.

Tis true, but are you still sticking to "old school" type parts for this project?....the creep towards modern parts is somewhat like a magnet

Next you might "accidentally" look at FPGAs, or micros with programmable logic sections.   

 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

So true, that has always been my cryptonite.... just add this, why not this?

In this case, I am allowing some flux before I really start documenting the project, but will stick to the DIP parts so I can had wire everything in the end.

 

Since I had to wander into "modern tech" for the AVR core and the DAC, I just thought it might make more sense to put the two together. If a $5.00 PIC gives me a 16 bit DAC and can perform the job of address counter to the SRAM, then one part does 2 jobs.

 

I have been struggling with this actually.

 

One side of me is swaying towards dropping the AVR completely and building the entire system out of only 74 logic, using R2R for the DAC. Funny, this project actually started life that way.

The other side wants a more functional music station with the goals being usability, even if I have to bend a little, which is how the SPI DAC and AVRs found their waybinto the mix.

 

Maybe I am getting slack in my old age! My decade younger version would build the entire thing from 500+ logic gates and some SRAM and never compromise.

Using AVR was not actually an important part of this project when I envisioned it, it was mainly about hand making a retro synth station and then making some amazing music with it.

 

Your comments resonate with me because they are so true, and have been on my mind for days as I sit at home fighting this stupid covid that took up residence in my body last week.

Before you know it I will be reaching for a slice of PI..... argh!!!

 

Wow, writing this all out has cleared my mind, and I have the original vision back. I know what to do now!

Sorry if this post was a bunch of rambling, like I said, I have the damn virus and my mind is not able to access all of the registers right now.

 

Thanks for reminding me about the dangers of feature / tech creep.... I was moving towards the dark side.

I am going to reaffirm and tune my project goals tonight so they are more aligned with the original vision , which ironically I came up with in the early 1980's!

 

Cheers,

Brad

 

 

avrcandies wrote:

If this is as good as it claims, seems pointless to purchase a dedicated SPI DAC with lets bits for the same price.

Makes one wonder why anyone would even produce one that was inferior to a uC of lesser cost really.

Tis true, but are you still sticking to "old school" type parts for this project?....the creep towards modern parts is somewhat like a magnet

Next you might "accidentally" look at FPGAs, or micros with programmable logic sections.   

 

No Fate But What We Make!

Last Edited: Mon. Jan 17, 2022 - 09:39 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

First off, hope you are getting well and back on your feet.  Nothing at all will matter if you don't have your health.

 

It's almost like you want to build 2 different synths (and maybe you will?)

 

One is showing off the absolute max that can be squeezed out of a tube of old school parts, pressed to their ultimate limit.

 

The other is a no-holds barred synth using 5 racks of DSP chips, 100GB of memory, 24 bit sound processing, voice control, two touch screens, etc, etc

 

It really is hard to draw the line, as there is also (somewhat) a limit of practicality, dependent upon how much time you can invest. 

 

It will be a sweet song of success, no matter what you do! 

When in the dark remember-the future looks brighter than ever.   I look forward to being able to predict the future!

Last Edited: Mon. Jan 17, 2022 - 10:12 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:
Looking around the Microchip parts selector, I see some of the DSPIC33F series have a 16 bit stereo DAC built in, specifically for audio.

They come in low pin count DIP format, ...

...

the dsPIC33FJ64GP804 and
dsPIC33FJ128GP804 

frown

By the Digi-Key parts selector

  • dsPIC33FJ128GP802
  • dsPIC33FJ64GP802

AtomicZombie wrote:
so if the PIC is decent,
PIC24/dsPIC are though can recall only one AVR Freaks member who operates these; these are good competition to TI MSP430 though MSP430 is in FSF GCC (you might not have any C for your use casewink

Uncertain you'll like MPLAB X; matters not as can operate outside any IDE.

AtomicZombie wrote:
... seems pointless to purchase a dedicated SPI DAC with lets bits for the same price.
Yet EOL audio DAC are still available from EOL/NRND distributors if willing to spend a bit for prototype and spares.

 


dsPIC33FJ128GP802 | Microchip Technology

dsPIC33F FRM Section 33. Audio Digital-to-Analog Converter (DAC)

https://www.microchipdirect.com/product/DSPIC33FJ128GP802-I/SP

though one year lead time

Lead Time | World's Largest Inventory of Microchip Products

 

Status of Supported Architectures from Maintainers' Point of View - GNU Project - Free Software Foundation (FSF) (GCC)

Working Outside of MPLAB® X IDE - Developer Help

MDB: The Microchip Debugger - Developer Help

 

AD1862 (Rev. A) (Analog Devices)

https://octopart.com/search?q=ad1851&currency=USD&specs=0&case_package=PDIP&case_package=DIP

AD1856N-K Analog Devices Inc. | Integrated Circuits (ICs) | DigiKey Marketplace

CS4329-KP Cirrus Logic Inc. | Integrated Circuits (ICs) | DigiKey Marketplace

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

avrcandies wrote:
the creep towards modern parts is somewhat like a magnet
Sometimes one's hand is forced (mid-90s MC68008 in PDIP but Motorola terminated PDIP assembling in Mexico IIRC)

Microchip Technology seems to keep PDIP and C migration (PIC -> PIC24 -> PIC32, MPLAB XC, Microchip Unified Standard Library)

There's some PIC24/dsPIC audio though more so PIC32 with SAM as a new arrival (software codecs)

 

ECE 4760 (Cornell University)

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:
... but will stick to the DIP parts so I can had wire everything in the end.
Considered protoboard and magnet wire?

AtomicZombie wrote:
The other side wants a more functional music station with the goals being usability, 
One design method is data x control (data path by discretes, control path by MCU)

 


ELM - Wiring Techniques

 

Through Hole CPLD - Complex Programmable Logic Devices – Mouser

https://www.digikey.com/en/products/filter/embedded-cplds-complex-programmable-logic-devices/695?s=N4IgjCBcoGwJxVAYygMwIYBsDOBTANCAPZQDaIALGGABxwDsIAuoQA4AuUIAyuwE4BLAHYBzEAF9CYOHUQgUkDDgLEyIAAzM2nSD37Cx4o0A (THT, active, cPLD)

too far?wink

 

edit : an 8051 controlling a 480 Mbps (60 MB/s) data engine

EZ-USB™ FX2LP - Infineon Technologies

GitHub - djmuhlestein/fx2lib: Library routines for creating firmware for the Cypress FX2 (CY7C68013 and variants) with SDCC

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Tue. Jan 18, 2022 - 03:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Keeping to your "DIP and 80s" requirement you could look at chips used in CD players of that period.

 

The TDA1541 is a 16-bit DAC from the second half of the 80s, just make sure you are sitting down when you see how much people want for them. Check out second-hand shops and the like and you might pick up a player for not much money.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Random thought...

 

many years ago I did some work using non-linear DACs, parts that used mu-law or a-law transfer characteristics. I've attached a datasheet for the parts I used below. The principle is that you get 12+sign resolution from a 7+sign data byte. 

 

The thought was to wonder if it's possible to make a simple one out of standard parts? Or even from just resistors like an R-2R (my gut feeling says 'no' but I'd need to doodle.)

 

A simple way would be to put the 8-bit byte through an external LUT to drive a 12-bit parallel DAC. Or could you deal with log values internally and make a log DAC? And would that make internal multiply operations, like level control, internal addition operations?

Attachment(s): 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Brian Fairchild wrote:
Or even from just resistors like an R-2R ...
Indeed though linear with caveats.

 

re audio DAC, am glad the classic parts are still around in sufficient quantity even though EOL.

Brad's discovery of audio DAC dsPIC opened my eyes (linear DAC is more for control systems and such)

Searching for THT I2S codec has been fruitless; guess is these were straight to SMT ('90s)

Reason : I2S codec are a match to PIC24/dsPIC

 


Project “Synthavr” – A Self-contained Retro Music Studio. | AVR Freaks

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

gchapman wrote:

Reason : I2S codec are a match to PIC24/dsPIC

 

PCM51xx are still current, even if less available then Unobtanium at the moment.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The more I look at it the more I think RP2040 is the chip to pick for a synth. While it does not have I2S by default it has two sub-CPUs that each have 9 opcodes and these can be programmed to do stuff like I2C/I2S/SPI etc. So there are already implementations of I2S in .pio assembler language. When you use Farnell or similar to search for a chip that can do 133MHz or more and that has I2S you hit a raft of Atmel SAM and especially STM32 Cortex that are 133MHz+ and have I2S but they are priced from £7+. Then you spot nearby in the list the RP2040 for £0.72 - which seems incredible (admittedly the min order is 10 but that's still just £7!). Then, when you search a bit you'll find the YouTube videos where someone profiled it to find that you can actually overlock the "133MHz" chip to 300MHz+ and still execute from flash or it can do 400MHz+ if running from RAM alone and you can live without flash access. That is a LOT of CPU power (and the chip contains two ARM cores so it is actually double that). It would allow any number of oscillator/noise sources (I'm thinking "2 Osc + 1 noise" each for 8 or even 16 polyphonic voices) and envelopes, filters, etc etc. It also natively has USB so MIDI and audio over USB should both be easily possible. Then, using PIO, it should be possible to connect to an I2S audio DAC (and you can get Banngood/AliExpress boards with a DAC and a 4ohm speaker amp for about £3)

 

So I've been reading a lot about the mathematical theory behind things like white/pink noise generation and also 3/4 state variable filters and IIR/FIR as the real key to synth audio is shaping the sound with resonant filters.

 

(when I used teensy to create a Synth all such audio modules were provided for you and the exercise was simply a "bolt them together" thing, for Raspberry Pico it would be a case of writing such audio modules from the ground up).

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

@Cliff,

 

I've just bought a copy of this book..."Think DSP: Digital Signal Processing in Python"

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

For performance I would do it in C++ but the book sounds like it could be interesting for understanding the mathematics and general algorithm structure.

 

Just looking at a short preview: https://www.google.de/books/edit...

 

Looks like about the level I can understand ;-)

 

Actually I see it's available for Kindle for £14 - might just do that - thanks for the suggestion.

 

I like the fact that the code is openly accessible: https://github.com/AllenDowney/T...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

clawson wrote:
When you use Farnell or similar to search for a chip that can do 133MHz or more and that has I2S you hit a raft of Atmel SAM and especially STM32 Cortex that are 133MHz+ and have I2S but they are priced from £7+.
50 MHz for PIC32MX I2S THT (MIPS, PIC32C is Arm Cortex-M0+)

200 MHz to 250 MHz for PIC32MZ I2S SMT

clawson wrote:
Then you spot nearby in the list the RP2040 for £0.72 - which seems incredible ...
Indeed

clawson wrote:
(and the chip contains two ARM cores so it is actually double that)
Am likewise enamored of the dual-core dsPIC (up to 125C temperature!)

clawson wrote:
IIR
IIR are conditionally stable yet so efficient in both domains (analog, digital); stability is range dependent which is eased by some computer languages.

 


PIC32MX1XX/2XX 28/36/44-pin Family Data Sheet

via

PIC32MX270F256B-50I/SP Microchip Technology | Integrated Circuits (ICs) | DigiKey

https://www.microchipdirect.com/product/PIC32MX270F256B-50I/SP

long lead time

Lead Time | World's Largest Inventory of Microchip Products

PIC32CM MC | Microchip Technology

PIC32MZ0512EFE064-I/MR Microchip Technology | Integrated Circuits (ICs) | DigiKey

 

Design Code Separately and Integrate Seamlessly with Dual-core dsPIC Digital Signal Controller | Microchip Technology | Microchip Technology

dsPIC33CH128MP508 | EEMBC Benchmark Score Viewer (CoreMark)

 

edit :

PIC32 Digital Audio | Microchip Technology

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Jan 19, 2022 - 01:29 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AoE lists some of the follow-on audio DAC though only in SMT (max pitch is SO 1.27 mm/50 mil)

I'm not leery of pitch converters, as the first prototype must exist, though pitch conversion is a no-go for Brad's use case.

 

The Art of Electronics 3rd Edition | by Horowitz and Hill

Download a sample chapter

[page 22, bottom right]

13.11. Audio ADCs. 939

[typo, it's Audio DAC]

CS4334/35/38 | Cirrus Logic

CS4339-KSZ Cirrus Logic Inc. | Integrated Circuits (ICs) | DigiKey

CS4334/35/38 noise = -120 dB at 1 KHz

dsPIC33FJ128GP802 SNR = 61 dB

 

edit : instead a 16-bit DAC in DIP though relatively expensive

MAX541/MAX542 Full Data Sheet (PDF) (SNR = 92 dB, MC68XXXX dates this DAC to the '90s and revision 2 is dated 12/99)

MAX542 +5V, Serial-Input, Voltage-Output 16-Bit DACs | Maxim Integrated

https://octopart.com/search?q=max542&currency=USD&specs=0&in_stock_only=1&case_package=DIP&case_package=PDIP

 

edit2 :

https://www.mouser.com/c/semiconductors/data-converter-ics/digital-to-analog-converters-dac/?q=MAX542&series=MAX542&qty=10

 

"Dare to be naïve." - Buckminster Fuller

Last Edited: Wed. Jan 19, 2022 - 02:02 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for all the input, this has been a great source if info, and I will reference it many times for sure.

I have finally sorted out my project, and it will split into two different projects so that I can keep to my original goals.

 

The original project is being pulled back to 1979, and will contain ONLY tech available before 1980. Obviously an AVR is not going to be allowed. 74 logic, SRAM, OP-Amps, and a 6502 processor.

 

As for the DAC, it's going to be 8 bit with .5% resistors. To combat that slight noise issue I foind when the waveform was at lower volume, the envelope generator will be fully analog, done with vactrols fed by another 8 bit R2R DAC. This way, the 8 bit digital wavefowm stays at full volume, and the ASDR envelope is clean and fully analog. This will probably sound even better than 12 bit SPI DAC output. This also reduces the math required by the software generating the waveform since the envelope will not have to be multiplied and mixed in code.

 

I have also decided to interface the project with my 1978 Commodore PET 4016, running the tracker and waveform generator from there. I will post a link to the project on my site once I have a few more photos to show, just in case someone wants to see this insanity unfold. I am already deep into breadboarding.

 

On the AVR side...

 

The "spin-off" project will be fully AVR based. I have recently found that my favorite small AVR, the ATTiny-85 can output an amazingly fast and clean 8 bit signal by using the 64MHz PWM and pushing it even further with some overclocking. 100+ MHz PWM is no problem at all with the Tinys that were pressed by Microchip's new process.

 

So my AVR version will by as Tiny as possible, squeezing every cycle out of a Tiny85 (or multiples) much the way I did it with my Tiny85 Video project.

That was fun.... counting every cycle and overclocking to the absolute limits. The project will be an exercise in efficient coding and pushing limits. The project will be more of a beatbox type of unit, just for some fun and easy live music creation.

 

I am back to work now, so my lab time will be limited. I do have some components on a breadboard now though, part of what will become one of the 8 or 16 channels I plan to use in the true retro synth project. I am also breadboarding some of the analog section, specifically the Buchla-style low pass resonant filter, which is the heart of so many analog synths of the era.

 

Ironically, the hardware now looks much like this work I did a few years back...

 

https://www.youtube.com/watch?v=CUAbSSq74V4

 

That DAC wasn't very good since resistor tolerance was not considered, and it had no analog section. I know a lot more now, and WILL make this sound amazing!

 

Oh, and the Commodore PET thing... yeah, I do a lot of work with my retro collection, and they are quite capable.

A 16 channel tracker written in tight 6502 assembly will have no problem controlling the hardware.

I will probably add a small monochrome overlay to the original PET as well so I can view waveforms at 640x200 resolution.

That will be based on some of this work...

 

https://www.youtube.com/watch?v=irBI9fVE9dY

 

So that's it for now. I will say hello again when I have a blog started for the Retro Synth, and also continue this thread when I start the Tiny85 synth.

This works well since I travel a lot, sometimes flying into a remote site for a week. I can now take the Tiny project with me and work on it!

 

 

Later,

Brad

 

No Fate But What We Make!

Last Edited: Wed. Jan 19, 2022 - 04:04 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

As for the DAC, it's going to be 8 bit with .5% resistors.

 

Will you not be running into tolerances of the output voltage of the 74 series logic, or whatever is driving the resistors? I'm not sure how tight the spec is.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

will contain ONLY tech available before 1980. Obviously an AVR is not going to be allowed. 74 logic, SRAM, OP-Amps, and a 6502 processor.

 

As for the DAC, it's going to be 8 bit with .5% resistors.

I don't recall .5% resistors being available then, but then I would not have been able to afford them if they were......

 

 

Keys to wealth:

Invest for cash flow, not capital gains!

Wealth is attracted, not chased! 

Income is proportional to how many you serve!

If you want something you've never had...

...you must be willing to do something you've never done!

Lets go Brandon!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, there will be some variance there. What I have found is that the output from a 74HC574 is very stable, especially when compared to the data port on the 8 bit SRAM. .5% resistors are probably overkill, and I will start with the 1% values I have on hand to see how it goes.

 

By moving all of the ramp generation to analog, the sound is going to be considerably better, especially when dealing with low amplitude sounds such as a slow decaying string. When I did test on 8 bit sound, this was always the issue, even in the SPI precision DAC. In fact the only reason I ended up looking in to the 12 BIT DAC was to give that 2 bits of overhead to eat the noise.

 

Now that the SRAM is doing the work of a complex oscillator, the nuances are left to the analog section as they should be. By the time the waveform passes through the vactrol controlled amplifier and then the lowpass resonant filter, it will be as clean as any analog synth, but have all the diversity of a digital synth.

 

This is going to be a real win I think - best of both worlds.

 

Brad

 

Brian Fairchild wrote:

AtomicZombie wrote:

As for the DAC, it's going to be 8 bit with .5% resistors.

 

Will you not be running into tolerances of the output voltage of the 74 series logic, or whatever is driving the resistors? I'm not sure how tight the spec is.

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In the mid 70's the Vishay RNC90Y was used in military equipment.

There were several extreme precision resistors out there, and all were worth a fortune for sure!

 

https://www.edn.com/the-invention-and-evolution-of-the-worlds-most-precise-resistor/

 

I have no rules about cost comparisons. For instance, I am using half a meg of SRAM (maybe 1MB) in each channel, which will make my synth more powerful than the quarter million dollar Fairlight CMU of the day. I am sure I will have more than 16 megabytes of SRAM in this thing before I am done - I already have 4MB on my breadboard now (all DIP parts, of course).

 

Was this amount of SRAM available in 1970? Yep, if you were NASA!

 

Here is the SRAM I am using. Still produced, and very affordable. I wonder what this amount of RAM would be worth in 1979? Thousands for sure!

 

https://www.futureelectronics.com/p/semiconductors--memory--RAM--static-ram--asynchronous/as6c4008-55pcn-alliance-memory-5985502?gclid=Cj0KCQiAip-PBhDVARIsAPP2xc3Vr2cNLyegBl3F3DMWFklJWKVP5C9pnzp0IJDS6fXky7a2KM9cD8kaAlSwEALw_wcB

 

Brad

 

ki0bk wrote:

AtomicZombie wrote:

will contain ONLY tech available before 1980. Obviously an AVR is not going to be allowed. 74 logic, SRAM, OP-Amps, and a 6502 processor.

 

As for the DAC, it's going to be 8 bit with .5% resistors.

I don't recall .5% resistors being available then, but then I would not have been able to afford them if they were......

 

No Fate But What We Make!

Last Edited: Wed. Jan 19, 2022 - 04:36 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

By moving all of the ramp generation to analog, the sound is going to be considerably better, especially when dealing with low amplitude sounds such as a slow decaying string. 

 

Exactly what Fairlight did with the CMI-01.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yeah, it blew me away when I started studying the CMI series and found out that they did what they did with just 8  bits and low computing power!

I still remember seeing a CMI demo on TV when I was a kid and wishing I had one..... soon that shall be a reality.

 

Here is a great video on the CMI and how it was used for the Terminator sound tracks...

 

https://www.youtube.com/watch?v=nnpYowxlwsU

 

CMI came into play in T2. The T1 analog soundtrack (Prophet Synth) is still pretty cool though. I want to capture both in my project.

Also notable in this video is how that guy did the Arnie voice impression... best I have ever heard!

 

Gets me fired up when I watch it, wish I had more time to mess around in my hacking lab!

 

Brad

 

Brian Fairchild wrote:

AtomicZombie wrote:

By moving all of the ramp generation to analog, the sound is going to be considerably better, especially when dealing with low amplitude sounds such as a slow decaying string. 

 

Exactly what Fairlight did with the CMI-01.

No Fate But What We Make!

Last Edited: Wed. Jan 19, 2022 - 05:02 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:

Yeah, it blew me away when I started studying the CMI series and found out that they did what they did with just 8  bits and low computing power!

CMI came into play in T2. The T1 analog soundtrack (Prophet Synth) is still pretty cool though. I want to capture both in my project.

 

I've been lucky enough to have both a CMI-01 and Prophet 5 on my bench in bits to study! The other day I found the hard-copy printout of my disassembly of the Prophet 5 Z80 code. And just this morning I was looking for something else in my chip drawers and spotted the set of EPROMs which are copies of the EPROMs inside a Linn Drum LM-1.

 

I really must do something 'noise' based again.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Are these designs planning to use CEM3340s, the classic analog filter for audio ? It's a decent filter that makes most older synths sound "phat".

 

I think CEM3340 dates from 70's/80's as I think it's what synths like early Moog's were stuffed full of. In fact this list...

 

https://en.wikipedia.org/wiki/CE...

 

EDIT: correction - 3340 was the VCO. It's other numbers for the 24dB/octave VCFs which are so key to making the right noises. For example Fairlight CMI used CEM3320's for its VCFs

Last Edited: Wed. Jan 19, 2022 - 05:37 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

In this case, all waveforms will be computed in software and then written to the channel memory. From there, DACs will control the analog sections.

No VCOs will be required as I can simulate everything from pure sinewave to an orchestral string on the screen (Commodore PET).

By combining the power of DDS with old-school anaolg I should be able to create any sound.

 

It will be fun to wait 3 or 4 minutes for the 1MHz 6502 to carve up a synthesized waveform, much like waiting for games of the day to load from tape.

Most samples will only need to be a few Kb though, so it won't be so bad. A quick shot of noise followed by some careful control of the low pass and resonance and massive retro phat drum sounds will be possible.

 

Each 512K channel is segmented as well, so I can store 8 individual "samples" per channel, although only one can play at a time.

I am probably going to have 16 full channels, although I am planning to start with 8.

 

Brad

 

clawson wrote:

Are these designs planning to use CEM3340s, the classic analog filter for audio ? It's a decent filter that makes most older synths sound "phat".

 

I think CEM3340 dates from 70's/80's as I think it's what synths like early Moog's were stuffed full of such filters. In fact this list...

 

https://en.wikipedia.org/wiki/CE...

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Now that is cool!

Did you have the CMI keyboard mechanics? It looks amazing, great quality and far more octaves than any keyboard in my collection, even my full size piano.

 

For this project, I am just going to butcher a kids keyboard since I don't need weight or velocity.

I even considered direct input on the PET keyboard, but I don't want to wear out my vintage gear!

 

Brad

 

Brian Fairchild wrote:

I've been lucky enough to have both a CMI-01 and Prophet 5 on my bench in bits to study! The other day I found the hard-copy printout of my disassembly of the Prophet 5 Z80 code. And just this morning I was looking for something else in my chip drawers and spotted the set of EPROMs which are copies of the EPROMs inside a Linn Drum LM-1.

I really must do something 'noise' based again.

No Fate But What We Make!

Last Edited: Wed. Jan 19, 2022 - 05:45 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

The 3340 parts a re a bit pricey too.

Since I will probably end up duplicating 16 channels, each with a dozen 74 ICs, a handful of OP-Amps, and a 512K SRAM, I do need to watch out for $20.00 single parts!

I have accepted a total project cost of about $500, and I have at least 50% of the needed parts in my stock already (yeah, I have a bog parts bin)!

 

On a side note, Mr. Moderator...

 

Should I continue to talk about the retro synth project here?

Although I do intend to get to the Tiny85 project variant (and post in this thread) one day, the current project will not have any AVR, and will become a massive thread if I continue.

I don't want to bulk up the forum with non-AVR related posts.

 

Just want to ask, as I will probably have a few hundred photos and dozens of videos soon.

I do intend to put this one into my own blog as well, but not until I have a few chapters to post.

 

Brad

 

 

 

 

clawson wrote:

Are these designs planning to use CEM3340s, the classic analog filter for audio ? It's a decent filter that makes most older synths sound "phat".

 

I think CEM3340 dates from 70's/80's as I think it's what synths like early Moog's were stuffed full of. In fact this list...

 

https://en.wikipedia.org/wiki/CE...

 

EDIT: correction - 3340 was the VCO. It's other numbers for the 24dB/octave VCFs which are so key to making the right noises. For example Fairlight CMI used CEM3320's for its VCFs

No Fate But What We Make!

Last Edited: Wed. Jan 19, 2022 - 10:01 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well personally I'm very interested in any synth design and would like to hear about it (and I don't think I'm the only one), we also love nostalgia/"retro" here too, so I think we can let it ride for now. ;-) 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok thanks, I will post here when I add to the project.

I will probably use AVRs along the way to simulate EPROMs and loaders on the breadboard, especially when I get into the 6502 part.

 

Brad

 

clawson wrote:

Well personally I'm very interested in any synth design and would like to hear about it (and I don't think I'm the only one), we also love nostalgia/"retro" here too, so I think we can let it ride for now. ;-) 

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I am just working on some schematics for one sound channel. So far, each channel will have 3 SRAMS, one 512K and two 32K.

The 512K is the Wave Ram, one 32K is the ASDR envelope RAM, and the other is a control RAM (explained later).

 

Frequency will be generated by two 590 counters running from a very fast master clock.

A 16 bit value will be tested by two 688 comparators, which will trigger a reset of the 2 counters. This reset signal is the frequency clock.

The frequency clock is then fed into five 163 counters, creating the required 19 bit address to the Wave Ram.

The 32K rams will see the upper 15 bits of the address only, so granularity will be to 16 bytes, more than enough.

 

The Control RAM is like microcode in a processor, with each bit triggering something in the channel hardware.

So far, I have divided up the bits like this, and if I need more, my pal 74HC138 will help out...

 

Bit 0 : End of sample flag to stop playback when reaching the end of a programmed sample. If key held, reset sample and loop.

Bits 1-3 : 19 bit address for the loop point of the sample (required when holding a key down playing a note).

Bit 4 : Loop point end flag used to trigger the counter reload if a key is held.

Bit 5 : Low pass filter up (will make a counter count up - this is connected to an R2R DAC fed to a vactrol).

Bit 6 : Low pass filter down.

Bit 7 : Resonance filter up.

Bit 8 : Resonance filter down.

 

Not sure if I am going to use 8 bit or 4 bit counters to feed the vactrols. 16 levels may be more than enough to get a full range.

If not, I will just chain two of the 193 counters together.

 

The ASDR data will be fed directly into an R2R DAC and vactrol to generate the analog envelope. This will keep the digital signal clean@

 

Other vactrol controlled filters will also be added, but on a global basis, some effecting the entire output, some only certain channels.

For instance, I am going to make a mechanical spring reverb unit, but put it on maybe 2 channels only. Not a fan of patch cables!

Some other FX ideas; distortion, EQ, phaser, flanger, 74 logic based echo unit, ect.

 

One last channel will be special, and have an original SPO256 voice synthesizer with its own FX. Gotta have vocals, right?

I know, bending the rules by 2 years since the SPO is dated 1982, but it deserves it, and was probably on the drawing board in 1979!

 

As for the mysterious and magical vactrols, I rolled my own using CDS cells and diodes sealed in a dark plastic tube.

Just as good as the originals that now seem to be made using unobtainium.

 

Other than that, the channels contain a bunch of 574 latches to get the data from the "Conductor", a circuit controlled by the PET that issues track data.

I will probably add a second 6502 to offload some of the processing as the PET will also have to handle the display of song data when playing back on the tracker.

 

PET Synth coms happen over the IEEE bus with the exception of the waveform graphics add-on, which will talk directly on the PET system bus.

 

All channels (8 or 16) as described here will be clones of each other.

Just a simple plan so far.

 

What is cool (or perhaps scary) is that I have all the ICs required to make at least 10 channels. Just need a few more 512k SRAMs to get to 16.

 

Brad

 

 

 

 

No Fate But What We Make!

Last Edited: Thu. Jan 20, 2022 - 02:49 AM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Here is the basic layout for a single channel, showing the main components that control the audio data and envelope generation.

I was calling it ASDR before, but this is not correct as the envelope can be as complex as the actual waveform.

For instance, 60Hz vibrato would be possible across the entire sample time, or even another waveform doing additive modulation.

 

Ok, I was lazy and just threw this together in SolidWorks on my break!

I am not a fan of CAD in my personal project, so proper hand drawn schematics will be done, but this helps work things out.

In this diagram, none of the control lines are connected yet. Might need a few 74 flip flops in there.

 

What this shows is 16 bit frequency generation, sample output, and volume control. Also shown are the loop address points.

To see a larger version, right click and open image in a new window and then click to expand.

 

 

Notice I am driving the LED in the DIY vactrol directly off the R2R DAC. I think this will work, but if not I will add a 2N3904 transistor amp.

I have also added 74HC574 latches to the outputs from SRAM to R2R DACs in order to keep linearity, and to align data to the clock.

 

This will be the first circuit on the breadboard as a test, and to keep this thread in line with the forum, I will be using an AVR328 for test control.

I will probably use AVRs to test everything until I am ready to start on the PET Bus interface. Less hours on my 1978 vintage machine that way.

 

Later,

Brad

No Fate But What We Make!

Last Edited: Thu. Jan 20, 2022 - 05:13 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

AtomicZombie wrote:
Less hours on my 1978 vintage machine that way.
Is 65C02 acceptable?

Reasons :

  • 600 nm at TSMC (much larger than AVR, "most" AVR are wafer fab in US)
  • PDIP
  • follow-on to the classic microcomputers (keyboards to overcome entropy)

 

Integrated Circuit (IC) | The Western Design Center, Inc.

W65C02S6TPG-14 Western Design Center (WDC) | Mouser

cc65 - a freeware C compiler for 6502 based systems

C ... indecision

A Standalone Z80 Computer by Donn Stewart

 

"Dare to be naïve." - Buckminster Fuller

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Yes, the 65C02 is very much acceptable, and the one I am using. I am not digging up actual vintage parts here (well, besides the PET), just the technology. For instance, I am using all 74HC logic, not 74LS, and although my RAM is all basic SRAM, the sizes I am using in a single package are larger than what was out in 1979. One single 512K SRAM takes the place of five hundred and twelve 4 bit 2K SRAMs of the era. Yeah, imagine 512 TTL ICs and the power that would require... getting into the ENIAC zone with 16 channels!

 

Here are a few of the 6502s in my collection. I have a tray full of 65C02s, given to me by WDC a while ago. Bill Mensch is a great guy, even answered some of my tech questions a few years back.

This project will have at least one 65C02 doing some extra work just to give the PET some help.

 

Brad

 

 

 

gchapman wrote:

AtomicZombie wrote:
Less hours on my 1978 vintage machine that way.
Is 65C02 acceptable?

Reasons :

  • 600 nm at TSMC (much larger than AVR, "most" AVR are wafer fab in US)
  • PDIP
  • follow-on to the classic microcomputers (keyboards to overcome entropy)

 

Integrated Circuit (IC) | The Western Design Center, Inc.

W65C02S6TPG-14 Western Design Center (WDC) | Mouser

cc65 - a freeware C compiler for 6502 based systems

C ... indecision

A Standalone Z80 Computer by Donn Stewart

 

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I wrote a simple VB script to simulate the Frequency Generator circuit, based on various input clock speeds to the 590 counters.

Seems that a 1MHz Master Clock gives a decent range, with only a 15Hz error near the top end of the scale...

 

16 BIT FREQUENCY GENERATOR USING 1000000.000 MHZ CLOCK...
NOTE : 0-A 		FREQ : 0027.50		RESULT : 0027.50	   ERROR : 000.00		REG VAL : 29172
NOTE : 0-A#		FREQ : 0029.14		RESULT : 0029.14	   ERROR : 000.00		REG VAL : 31213
NOTE : 0-B 		FREQ : 0030.87		RESULT : 0030.87	   ERROR : 000.00		REG VAL : 33140
NOTE : 1-C 		FREQ : 0032.70		RESULT : 0032.70	   ERROR : 000.00		REG VAL : 34958
NOTE : 1-C#		FREQ : 0034.65		RESULT : 0034.65	   ERROR : 000.00		REG VAL : 36674
NOTE : 1-D 		FREQ : 0036.71		RESULT : 0036.71	   ERROR : 000.00		REG VAL : 38294
NOTE : 1-D#		FREQ : 0038.89		RESULT : 0038.89	   ERROR : 000.00		REG VAL : 39823
NOTE : 1-E 		FREQ : 0041.20		RESULT : 0041.20	   ERROR : 000.00		REG VAL : 41266
NOTE : 1-F 		FREQ : 0043.65		RESULT : 0043.65	   ERROR : 000.00		REG VAL : 42628
NOTE : 1-F#		FREQ : 0046.25		RESULT : 0046.25	   ERROR : 000.00		REG VAL : 43914
NOTE : 1-G 		FREQ : 0049.00		RESULT : 0049.00	   ERROR : 000.00		REG VAL : 45128
NOTE : 1-G#		FREQ : 0051.91		RESULT : 0051.92	   ERROR : 000.00		REG VAL : 46273
NOTE : 1-A 		FREQ : 0055.00		RESULT : 0055.00	   ERROR : 000.00		REG VAL : 47354
NOTE : 1-A#		FREQ : 0058.27		RESULT : 0058.28	   ERROR : 000.00		REG VAL : 48375
NOTE : 1-B 		FREQ : 0061.74		RESULT : 0061.74	   ERROR : 000.00		REG VAL : 49338
NOTE : 2-C 		FREQ : 0065.41		RESULT : 0065.41	   ERROR : 000.00		REG VAL : 50247
NOTE : 2-C#		FREQ : 0069.30		RESULT : 0069.30	   ERROR : 000.00		REG VAL : 51105
NOTE : 2-D 		FREQ : 0073.42		RESULT : 0073.42	   ERROR : 000.01		REG VAL : 51915
NOTE : 2-D#		FREQ : 0077.78		RESULT : 0077.79	   ERROR : 000.01		REG VAL : 52680
NOTE : 2-E 		FREQ : 0082.41		RESULT : 0082.41	   ERROR : 000.01		REG VAL : 53401
NOTE : 2-F 		FREQ : 0087.31		RESULT : 0087.31	   ERROR : 000.01		REG VAL : 54082
NOTE : 2-F#		FREQ : 0092.50		RESULT : 0092.51	   ERROR : 000.01		REG VAL : 54725
NOTE : 2-G 		FREQ : 0098.00		RESULT : 0098.01	   ERROR : 000.01		REG VAL : 55332
NOTE : 2-G#		FREQ : 0103.83		RESULT : 0103.84	   ERROR : 000.02		REG VAL : 55905
NOTE : 2-A 		FREQ : 0110.00		RESULT : 0110.01	   ERROR : 000.01		REG VAL : 56445
NOTE : 2-A#		FREQ : 0116.54		RESULT : 0116.55	   ERROR : 000.01		REG VAL : 56955
NOTE : 2-B 		FREQ : 0123.47		RESULT : 0123.49	   ERROR : 000.02		REG VAL : 57437
NOTE : 3-C 		FREQ : 0130.81		RESULT : 0130.82	   ERROR : 000.01		REG VAL : 57891
NOTE : 3-C#		FREQ : 0138.59		RESULT : 0138.62	   ERROR : 000.03		REG VAL : 58321
NOTE : 3-D 		FREQ : 0146.83		RESULT : 0146.84	   ERROR : 000.01		REG VAL : 58725
NOTE : 3-D#		FREQ : 0155.56		RESULT : 0155.59	   ERROR : 000.03		REG VAL : 59108
NOTE : 3-E 		FREQ : 0164.81		RESULT : 0164.85	   ERROR : 000.04		REG VAL : 59469
NOTE : 3-F 		FREQ : 0174.61		RESULT : 0174.64	   ERROR : 000.03		REG VAL : 59809
NOTE : 3-F#		FREQ : 0185.00		RESULT : 0185.05	   ERROR : 000.05		REG VAL : 60131
NOTE : 3-G 		FREQ : 0196.00		RESULT : 0196.04	   ERROR : 000.04		REG VAL : 60434
NOTE : 3-G#		FREQ : 0207.65		RESULT : 0207.68	   ERROR : 000.03		REG VAL : 60720
NOTE : 3-A 		FREQ : 0220.00		RESULT : 0220.07	   ERROR : 000.07		REG VAL : 60991
NOTE : 3-A#		FREQ : 0233.08		RESULT : 0233.15	   ERROR : 000.07		REG VAL : 61246
NOTE : 3-B 		FREQ : 0246.94		RESULT : 0246.97	   ERROR : 000.03		REG VAL : 61486
NOTE : 4-C 		FREQ : 0261.63		RESULT : 0261.71	   ERROR : 000.09		REG VAL : 61714
NOTE : 4-C#		FREQ : 0277.18		RESULT : 0277.24	   ERROR : 000.06		REG VAL : 61928
NOTE : 4-D 		FREQ : 0293.67		RESULT : 0293.77	   ERROR : 000.11		REG VAL : 62131
NOTE : 4-D#		FREQ : 0311.13		RESULT : 0311.24	   ERROR : 000.11		REG VAL : 62322
NOTE : 4-E 		FREQ : 0329.63		RESULT : 0329.71	   ERROR : 000.08		REG VAL : 62502
NOTE : 4-F 		FREQ : 0349.23		RESULT : 0349.41	   ERROR : 000.18		REG VAL : 62673
NOTE : 4-F#		FREQ : 0369.99		RESULT : 0370.10	   ERROR : 000.10		REG VAL : 62833
NOTE : 4-G 		FREQ : 0392.00		RESULT : 0392.16	   ERROR : 000.16		REG VAL : 62985
NOTE : 4-G#		FREQ : 0415.31		RESULT : 0415.45	   ERROR : 000.15		REG VAL : 63128
NOTE : 4-A 		FREQ : 0440.00		RESULT : 0440.14	   ERROR : 000.14		REG VAL : 63263
NOTE : 4-A#		FREQ : 0466.16		RESULT : 0466.42	   ERROR : 000.25		REG VAL : 63391
NOTE : 4-B 		FREQ : 0493.88		RESULT : 0494.07	   ERROR : 000.19		REG VAL : 63511
NOTE : 5-C 		FREQ : 0523.25		RESULT : 0523.56	   ERROR : 000.31		REG VAL : 63625
NOTE : 5-C#		FREQ : 0554.37		RESULT : 0554.63	   ERROR : 000.27		REG VAL : 63732
NOTE : 5-D 		FREQ : 0587.33		RESULT : 0587.54	   ERROR : 000.21		REG VAL : 63833
NOTE : 5-D#		FREQ : 0622.25		RESULT : 0622.67	   ERROR : 000.41		REG VAL : 63929
NOTE : 5-E 		FREQ : 0659.26		RESULT : 0659.63	   ERROR : 000.38		REG VAL : 64019
NOTE : 5-F 		FREQ : 0698.46		RESULT : 0698.81	   ERROR : 000.36		REG VAL : 64104
NOTE : 5-F#		FREQ : 0739.99		RESULT : 0740.74	   ERROR : 000.75		REG VAL : 64185
NOTE : 5-G 		FREQ : 0783.99		RESULT : 0784.31	   ERROR : 000.32		REG VAL : 64260
NOTE : 5-G#		FREQ : 0830.61		RESULT : 0831.26	   ERROR : 000.65		REG VAL : 64332
NOTE : 5-A 		FREQ : 0880.00		RESULT : 0881.06	   ERROR : 001.06		REG VAL : 64400
NOTE : 5-A#		FREQ : 0932.33		RESULT : 0932.84	   ERROR : 000.51		REG VAL : 64463
NOTE : 5-B 		FREQ : 0987.77		RESULT : 0989.12	   ERROR : 001.35		REG VAL : 64524
NOTE : 6-C 		FREQ : 1046.50		RESULT : 1047.12	   ERROR : 000.62		REG VAL : 64580
NOTE : 6-C#		FREQ : 1108.73		RESULT : 1109.88	   ERROR : 001.15		REG VAL : 64634
NOTE : 6-D 		FREQ : 1174.66		RESULT : 1176.47	   ERROR : 001.81		REG VAL : 64685
NOTE : 6-D#		FREQ : 1244.51		RESULT : 1245.33	   ERROR : 000.82		REG VAL : 64732
NOTE : 6-E 		FREQ : 1318.51		RESULT : 1321.00	   ERROR : 002.49		REG VAL : 64778
NOTE : 6-F 		FREQ : 1396.91		RESULT : 1398.60	   ERROR : 001.69		REG VAL : 64820
NOTE : 6-F#		FREQ : 1479.98		RESULT : 1481.48	   ERROR : 001.50		REG VAL : 64860
NOTE : 6-G 		FREQ : 1567.98		RESULT : 1569.86	   ERROR : 001.88		REG VAL : 64898
NOTE : 6-G#		FREQ : 1661.22		RESULT : 1663.89	   ERROR : 002.67		REG VAL : 64934
NOTE : 6-A 		FREQ : 1760.00		RESULT : 1763.67	   ERROR : 003.67		REG VAL : 64968
NOTE : 6-A#		FREQ : 1864.66		RESULT : 1869.16	   ERROR : 004.50		REG VAL : 65000
NOTE : 6-B 		FREQ : 1975.53		RESULT : 1980.20	   ERROR : 004.67		REG VAL : 65030
NOTE : 7-C 		FREQ : 2093.00		RESULT : 2096.44	   ERROR : 003.44		REG VAL : 65058
NOTE : 7-C#		FREQ : 2217.46		RESULT : 2222.22	   ERROR : 004.76		REG VAL : 65085
NOTE : 7-D 		FREQ : 2349.32		RESULT : 2352.94	   ERROR : 003.62		REG VAL : 65110
NOTE : 7-D#		FREQ : 2489.02		RESULT : 2493.77	   ERROR : 004.75		REG VAL : 65134
NOTE : 7-E 		FREQ : 2637.02		RESULT : 2645.50	   ERROR : 008.48		REG VAL : 65157
NOTE : 7-F 		FREQ : 2793.83		RESULT : 2801.12	   ERROR : 007.29		REG VAL : 65178
NOTE : 7-F#		FREQ : 2959.96		RESULT : 2967.36	   ERROR : 007.40		REG VAL : 65198
NOTE : 7-G 		FREQ : 3135.96		RESULT : 3144.65	   ERROR : 008.69		REG VAL : 65217
NOTE : 7-G#		FREQ : 3322.44		RESULT : 3333.33	   ERROR : 010.89		REG VAL : 65235
NOTE : 7-A 		FREQ : 3520.00		RESULT : 3533.57	   ERROR : 013.57		REG VAL : 65252
NOTE : 7-A#		FREQ : 3729.31		RESULT : 3745.32	   ERROR : 016.01		REG VAL : 65268
NOTE : 7-B 		FREQ : 3951.07		RESULT : 3968.25	   ERROR : 017.18		REG VAL : 65283
NOTE : 8-C 		FREQ : 4186.01		RESULT : 4201.68	   ERROR : 015.67		REG VAL : 65297

 

I am going to generate some tones in Audacity to see if I can hear the difference.

I have a keen ear for tuning, so if I notice the error then I may have to go to a 24 bit resolution.

Not a big deal, just means one more 590 and 574 in the already growing Channel Circuit.

 

Brad

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, came in from shoveling snow and did some tests in Audacity.

I generated sinewaves for various pairs of tones - the exact frequency and the best result frequency.

I played them back as a pair to hear the de-tune harmonics and then one after the other to see if there was a noticeable difference.

 

There is not.

 

The largest errors are at the very high end of the scale, and I could not really detect the difference.

I doubt I will ever need to pitch up that high unless I am doing some insane screaming lead sounds.

 

I then tried the lowest note that had at least one Hz of error, and that was 6-C# at 1108.73Hz and again, the difference was not detectable.

Overlaying the tones gave an expected 1Hz resonance, but one after the other, I could not tell them apart.

Since all channels will be based on the same hardware, there should be no noticeable detuning when playing the same note on similar samples.

 

So 16 bits is good enough for an accurate representation of 8 full keyboard octaves, even more if I want.

 

I am now ready to start breadboarding the basic channel as shown in the above schematic.

Will post progress photos when I have something done.

 

Brad

 

 

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quick correction. I wrote the script to wrap the counter back to the register value instead of up to the register value.

Now that I reran the numbers, the accuracy is even better, only one note that is more than 1 Hz off, and most right on the mark...

 

16 BIT FREQUENCY GENERATOR USING 1000000.000 MHZ CLOCK...
NOTE : 0-A 	FREQ : 0027.50	RESULT : 0027.50	   ERROR : 000.00	REG VAL : 36364
NOTE : 0-A#	FREQ : 0029.14	RESULT : 0029.13	   ERROR : 000.00	REG VAL : 34323
NOTE : 0-B 	FREQ : 0030.87	RESULT : 0030.87	   ERROR : 000.00	REG VAL : 32396
NOTE : 1-C 	FREQ : 0032.70	RESULT : 0032.70	   ERROR : 000.00	REG VAL : 30578
NOTE : 1-C#	FREQ : 0034.65	RESULT : 0034.65	   ERROR : 000.00	REG VAL : 28862
NOTE : 1-D 	FREQ : 0036.71	RESULT : 0036.71	   ERROR : 000.00	REG VAL : 27242
NOTE : 1-D#	FREQ : 0038.89	RESULT : 0038.89	   ERROR : 000.00	REG VAL : 25713
NOTE : 1-E 	FREQ : 0041.20	RESULT : 0041.20	   ERROR : 000.00	REG VAL : 24270
NOTE : 1-F 	FREQ : 0043.65	RESULT : 0043.65	   ERROR : 000.00	REG VAL : 22908
NOTE : 1-F#	FREQ : 0046.25	RESULT : 0046.25	   ERROR : 000.00	REG VAL : 21622
NOTE : 1-G 	FREQ : 0049.00	RESULT : 0049.00	   ERROR : 000.00	REG VAL : 20408
NOTE : 1-G#	FREQ : 0051.91	RESULT : 0051.91	   ERROR : 000.00	REG VAL : 19263
NOTE : 1-A 	FREQ : 0055.00	RESULT : 0055.00	   ERROR : 000.00	REG VAL : 18182
NOTE : 1-A#	FREQ : 0058.27	RESULT : 0058.27	   ERROR : 000.00	REG VAL : 17161
NOTE : 1-B 	FREQ : 0061.74	RESULT : 0061.74	   ERROR : 000.00	REG VAL : 16198
NOTE : 2-C 	FREQ : 0065.41	RESULT : 0065.41	   ERROR : 000.00	REG VAL : 15289
NOTE : 2-C#	FREQ : 0069.30	RESULT : 0069.30	   ERROR : 000.00	REG VAL : 14431
NOTE : 2-D 	FREQ : 0073.42	RESULT : 0073.42	   ERROR : 000.00	REG VAL : 13621
NOTE : 2-D#	FREQ : 0077.78	RESULT : 0077.78	   ERROR : 000.00	REG VAL : 12856
NOTE : 2-E 	FREQ : 0082.41	RESULT : 0082.41	   ERROR : 000.00	REG VAL : 12135
NOTE : 2-F 	FREQ : 0087.31	RESULT : 0087.31	   ERROR : 000.00	REG VAL : 11454
NOTE : 2-F#	FREQ : 0092.50	RESULT : 0092.50	   ERROR : 000.00	REG VAL : 10811
NOTE : 2-G 	FREQ : 0098.00	RESULT : 0098.00	   ERROR : 000.00	REG VAL : 10204
NOTE : 2-G#	FREQ : 0103.83	RESULT : 0103.83	   ERROR : 000.01	REG VAL : 9631
NOTE : 2-A 	FREQ : 0110.00	RESULT : 0110.00	   ERROR : 000.00	REG VAL : 9091
NOTE : 2-A#	FREQ : 0116.54	RESULT : 0116.54	   ERROR : 000.00	REG VAL : 8581
NOTE : 2-B 	FREQ : 0123.47	RESULT : 0123.47	   ERROR : 000.00	REG VAL : 8099
NOTE : 3-C 	FREQ : 0130.81	RESULT : 0130.80	   ERROR : 000.01	REG VAL : 7645
NOTE : 3-C#	FREQ : 0138.59	RESULT : 0138.60	   ERROR : 000.01	REG VAL : 7215
NOTE : 3-D 	FREQ : 0146.83	RESULT : 0146.82	   ERROR : 000.01	REG VAL : 6811
NOTE : 3-D#	FREQ : 0155.56	RESULT : 0155.57	   ERROR : 000.01	REG VAL : 6428
NOTE : 3-E 	FREQ : 0164.81	RESULT : 0164.83	   ERROR : 000.01	REG VAL : 6067
NOTE : 3-F 	FREQ : 0174.61	RESULT : 0174.61	   ERROR : 000.00	REG VAL : 5727
NOTE : 3-F#	FREQ : 0185.00	RESULT : 0185.01	   ERROR : 000.02	REG VAL : 5405
NOTE : 3-G 	FREQ : 0196.00	RESULT : 0196.00	   ERROR : 000.00	REG VAL : 5102
NOTE : 3-G#	FREQ : 0207.65	RESULT : 0207.64	   ERROR : 000.01	REG VAL : 4816
NOTE : 3-A 	FREQ : 0220.00	RESULT : 0220.02	   ERROR : 000.02	REG VAL : 4545
NOTE : 3-A#	FREQ : 0233.08	RESULT : 0233.10	   ERROR : 000.02	REG VAL : 4290
NOTE : 3-B 	FREQ : 0246.94	RESULT : 0246.91	   ERROR : 000.03	REG VAL : 4050
NOTE : 4-C 	FREQ : 0261.63	RESULT : 0261.64	   ERROR : 000.02	REG VAL : 3822
NOTE : 4-C#	FREQ : 0277.18	RESULT : 0277.16	   ERROR : 000.02	REG VAL : 3608
NOTE : 4-D 	FREQ : 0293.67	RESULT : 0293.69	   ERROR : 000.02	REG VAL : 3405
NOTE : 4-D#	FREQ : 0311.13	RESULT : 0311.14	   ERROR : 000.01	REG VAL : 3214
NOTE : 4-E 	FREQ : 0329.63	RESULT : 0329.60	   ERROR : 000.03	REG VAL : 3034
NOTE : 4-F 	FREQ : 0349.23	RESULT : 0349.28	   ERROR : 000.06	REG VAL : 2863
NOTE : 4-F#	FREQ : 0369.99	RESULT : 0369.96	   ERROR : 000.03	REG VAL : 2703
NOTE : 4-G 	FREQ : 0392.00	RESULT : 0392.00	   ERROR : 000.01	REG VAL : 2551
NOTE : 4-G#	FREQ : 0415.31	RESULT : 0415.28	   ERROR : 000.02	REG VAL : 2408
NOTE : 4-A 	FREQ : 0440.00	RESULT : 0439.95	   ERROR : 000.05	REG VAL : 2273
NOTE : 4-A#	FREQ : 0466.16	RESULT : 0466.20	   ERROR : 000.04	REG VAL : 2145
NOTE : 4-B 	FREQ : 0493.88	RESULT : 0493.83	   ERROR : 000.06	REG VAL : 2025
NOTE : 5-C 	FREQ : 0523.25	RESULT : 0523.29	   ERROR : 000.04	REG VAL : 1911
NOTE : 5-C#	FREQ : 0554.37	RESULT : 0554.32	   ERROR : 000.04	REG VAL : 1804
NOTE : 5-D 	FREQ : 0587.33	RESULT : 0587.20	   ERROR : 000.13	REG VAL : 1703
NOTE : 5-D#	FREQ : 0622.25	RESULT : 0622.28	   ERROR : 000.02	REG VAL : 1607
NOTE : 5-E 	FREQ : 0659.26	RESULT : 0659.20	   ERROR : 000.06	REG VAL : 1517
NOTE : 5-F 	FREQ : 0698.46	RESULT : 0698.32	   ERROR : 000.13	REG VAL : 1432
NOTE : 5-F#	FREQ : 0739.99	RESULT : 0740.19	   ERROR : 000.20	REG VAL : 1351
NOTE : 5-G 	FREQ : 0783.99	RESULT : 0783.70	   ERROR : 000.29	REG VAL : 1276
NOTE : 5-G#	FREQ : 0830.61	RESULT : 0830.56	   ERROR : 000.04	REG VAL : 1204
NOTE : 5-A 	FREQ : 0880.00	RESULT : 0880.28	   ERROR : 000.28	REG VAL : 1136
NOTE : 5-A#	FREQ : 0932.33	RESULT : 0931.97	   ERROR : 000.36	REG VAL : 1073
NOTE : 5-B 	FREQ : 0987.77	RESULT : 0988.14	   ERROR : 000.38	REG VAL : 1012
NOTE : 6-C 	FREQ : 1046.50	RESULT : 1046.03	   ERROR : 000.47	REG VAL : 956
NOTE : 6-C#	FREQ : 1108.73	RESULT : 1108.65	   ERROR : 000.08	REG VAL : 902
NOTE : 6-D 	FREQ : 1174.66	RESULT : 1175.09	   ERROR : 000.43	REG VAL : 851
NOTE : 6-D#	FREQ : 1244.51	RESULT : 1243.78	   ERROR : 000.73	REG VAL : 804
NOTE : 6-E 	FREQ : 1318.51	RESULT : 1319.26	   ERROR : 000.75	REG VAL : 758
NOTE : 6-F 	FREQ : 1396.91	RESULT : 1396.65	   ERROR : 000.26	REG VAL : 716
NOTE : 6-F#	FREQ : 1479.98	RESULT : 1479.29	   ERROR : 000.69	REG VAL : 676
NOTE : 6-G 	FREQ : 1567.98	RESULT : 1567.40	   ERROR : 000.58	REG VAL : 638
NOTE : 6-G#	FREQ : 1661.22	RESULT : 1661.13	   ERROR : 000.09	REG VAL : 602
NOTE : 6-A 	FREQ : 1760.00	RESULT : 1760.56	   ERROR : 000.56	REG VAL : 568
NOTE : 6-A#	FREQ : 1864.66	RESULT : 1865.67	   ERROR : 001.01	REG VAL : 536
NOTE : 6-B 	FREQ : 1975.53	RESULT : 1976.28	   ERROR : 000.75	REG VAL : 506
NOTE : 7-C 	FREQ : 2093.00	RESULT : 2092.05	   ERROR : 000.95	REG VAL : 478
NOTE : 7-C#	FREQ : 2217.46	RESULT : 2217.29	   ERROR : 000.17	REG VAL : 451
NOTE : 7-D 	FREQ : 2349.32	RESULT : 2347.42	   ERROR : 001.90	REG VAL : 426
NOTE : 7-D#	FREQ : 2489.02	RESULT : 2487.56	   ERROR : 001.46	REG VAL : 402
NOTE : 7-E 	FREQ : 2637.02	RESULT : 2638.52	   ERROR : 001.50	REG VAL : 379
NOTE : 7-F 	FREQ : 2793.83	RESULT : 2793.30	   ERROR : 000.53	REG VAL : 358
NOTE : 7-F#	FREQ : 2959.96	RESULT : 2958.58	   ERROR : 001.38	REG VAL : 338
NOTE : 7-G 	FREQ : 3135.96	RESULT : 3134.80	   ERROR : 001.16	REG VAL : 319
NOTE : 7-G#	FREQ : 3322.44	RESULT : 3322.26	   ERROR : 000.18	REG VAL : 301
NOTE : 7-A 	FREQ : 3520.00	RESULT : 3521.13	   ERROR : 001.13	REG VAL : 284
NOTE : 7-A#	FREQ : 3729.31	RESULT : 3731.34	   ERROR : 002.03	REG VAL : 268
NOTE : 7-B 	FREQ : 3951.07	RESULT : 3952.57	   ERROR : 001.50	REG VAL : 253
NOTE : 8-C 	FREQ : 4186.01	RESULT : 4184.10	   ERROR : 001.91	REG VAL : 239

 

I will lay down the 6 ICs that make the Frequency Generator and then let an AVR run through the above values.

Verification will be done on my scope. Will post videos soon.

 

Brad

No Fate But What We Make!

Last Edited: Thu. Jan 20, 2022 - 11:30 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

On a side note (or frequency), the most common method of DDS is by using a phase accumulator, and certainly one can be made from discrete logic as the 74HC283 4 bit addder is still widely produced. You can get it in DIP format for $1.00...

 

https://www.digikey.com/en/products/detail/texas-instruments/CD74HC283E/555829

 

Here is an amazing and capable DDS made from just a few ICs - original source from Radio Electronics Electronic Experimenter's Handbook (1993)...

 

https://www.industrial-electronics.com/re_elec-exp-hndbk_sinewave.html

 

A great read, even if you are doing a software based DDS in an AVR.

 

Anyhow, I chose not to go this route for several reasons...

 

- Much better accuracy of sample playback by changing the source clock rather than skipping bytes.

- No glitching as the counter rolls over and samples "pop" from drastic changes.

- No ability to "re-use" the counter to address the SRAM unless the entire RAM is used for a single sample.

 

The last point is really the killer for me. For instance in one channel, I may store a lot of short percussion samples, since one only needs to play at once.

With the standard phase accum dds approach, you normally roll your counter and feed it to the SRAM as well, so the entire RAM is one waveform.

 

So in my system, I just issue an insanely fast master clock, and change the actual sample rate.

A sample may be set to its "base frequency" at a playback rate of 500,000 HZ, giving headroom higher and lower.

At full tilt, the circuit will be capable of cranking out up to 20,000,000 samples per second! (Yes, 20 million).

I will never need that speed, but having all of that headroom means better granularity for frequency discrimination.

I will be happy with 3 octaves of perfect accuracy, and whatever is left over. The numbers above seem to show this is possible.

 

This ability to pump out samples at a rate that makes a CD player cry along with the external analog envelope will result in great sound, even at 8 bits.

..... or so that is the plan!

 

Brad

 

No Fate But What We Make!

Last Edited: Fri. Jan 21, 2022 - 06:55 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course, all of these counter and comparators would be void if I knew of an 80's era digital clock generator with a frequency range between 1000Hz and  100,000Hz with 1Hz increments!

As far as I know, there are no such devices.

 

Brad

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Rate Multipliers? Have a look at the CMI Fairlight schematics. It assumes of course that you can still get the chips.

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hey thanks, that IC is a new one to me!

Also interesting is that it is still in production, affordable, and made in DIP...

 

https://www.digikey.ca/en/products/detail/texas-instruments/CD4089BE/67327?s=N4IgjCBcpgTAnBaIDGUBmBDANgZwKYA0IA9lANrgAMAHACx2wgC6xADgC5QgDKHATgEsAdgHMQAX2IBaJsjSQBAVyKkKIAKwsJUkHMooAJnVrwABNqA

 

Looking at the datasheet, I am not quite clear as to what is happening. Seems this IC should be called a rate divider as that is what it appears to do... 16 clock pulses go in and some number between 1 and 16 come out.

 

Perhaps I am not seeing this correctly?

 

4089 DataSheet

 

If that is the case, then this IC is a real contender for sure! Just chain 6 together and now you have a true 24 bit DDS!

 

That actually seems too complex a job for an IC of this date, so I must be seeing this incorrectly.

I mean how could they have possibly designed such a complex IC back then?

Thinking about the task, I would see dozens of fast ICs combined with state of the art PLLs, lookup tables and all sorts of other magic.

 

Imagine what has to happen inside that IC to have say 13 pulses come out in the same period as 16 pulses.

If I was given that task, I would clock an FPGA up to 500MHz, and still only get something with "half decent" resolution.

If this IC can really do that, then it is magical, and I will order a few tubes right away.

 

I also looked for CMI Model One schematics, but only came up with basic service manuals.

If they are out in the wild, do you have a link? I would certainly be interested in seeing what they did in 1979!

 

Cheers!

Brad

 

 

 

Brian Fairchild wrote:

Rate Multipliers? Have a look at the CMI Fairlight schematics. It assumes of course that you can still get the chips.

No Fate But What We Make!

Last Edited: Sat. Jan 22, 2022 - 04:28 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok, I found a datasheet on the CD4089 that makes a LOT more sense...

 

http://www.incbtech.com/index.php/83-cmos-integrated-circuit-informations/1347-4089-binary-rate-multiplier-cm053e

 

There is no magic, it just skips certain pulses.

This will not work in my application since the output pulses will have an insane amount of jitter.

 

I can think of a few ways to sum them all up and then feed them to another counter, but now the IC count is higher than my original plan.

Today I have some time so I am going to breadboard the ultra high speed sample rate divider as per my above schematic an test it out.

 

The 4089 will be added to some future project though, perhaps a hardware version of a Bressenham Line Drawer in another Game System.

 

Brad

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ok last post, I need to use my time on the breadboard today!

 

Thinking again about the 4 bit CD4089 it seems like a pointless IC to make.

You can do the same exact thing (but much faster) using any of the 7400 parallel to serial shift registers!

 

For instance, feed an a bit value into the 74HC166, and out comes the bit pattern.

Chain 2 of them and you now have the same functionality of the  4089, but in much faster HC logic.

The CD5089 can to maybe 2MHz, but the HC166 can reach over 30MHz!

 

Maybe that's why the IC was not well known?

 

Ok, I must discipline my wandering mind and hit the breadboard or all of this is just going to become..... "coffee house bullsh$t!"

 

... quote stolen from Rocco

https://www.goodreads.com/author/quotes/7251103.David_Della_Rocco

 

Brad

 

No Fate But What We Make!

Last Edited: Sat. Jan 22, 2022 - 04:44 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0


AtomicZombie wrote:

I also looked for CMI Model One schematics, but only came up with basic service manuals.

If they are out in the wild, do you have a link? I would certainly be interested in seeing what they did in 1979!

 

Ah yes, the original service manual didn't include the channel card as it was considered a secret. But they do seem to be out there. See the attached.

 

Yes, the rate multiplier jitters like mad but CMI fed it into a regular divide-n counter which acts as a jitter filter.

 

Also, do you have a copy of this? You should. PDFs can be found online.

 

 

Attachment(s): 

#1 Hardware Problem? https://www.avrfreaks.net/forum/...

#2 Hardware Problem? Read AVR042.

#3 All grounds are not created equal

#4 Have you proved your chip is running at xxMHz?

#5 "If you think you need floating point to solve the problem then you don't understand the problem. If you really do need floating point then you have a problem you do not understand."

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 1

To keep this thread AVR flavored.

 

 

 

ATMega on the bottom right is going to fill in for the Commodore PET just as I test out these ideas.

Laying down basic channel ICs to figure out how much room I need. Wow, this is going to be a beast, might only fit 2 of the 16 channels on the massive boards.

 

Brad

 

No Fate But What We Make!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks, got it and will read on my next road trip. Looks like a good one!

Here is a link...

 

http://sites.music.columbia.edu/cmc/courses/g6610/fall2016/week8/Musical_Applications_of_Microprocessors-Charmberlin.pdf

 

Brian Fairchild wrote:

Also, do you have a copy of this? You should. PDFs can be found online.

No Fate But What We Make!

Pages