PSIM-1 Club

Blacet, Metalbox, Synthasonic, PAiA and the rest.... a frac frenzy!

Moderators: Joe., lisa, luketeaford, Kent

Post Reply
User avatar
oozitron
solder fume huffer
Posts: 806
Joined: Fri Jan 23, 2009 6:11 pm
Location: in a beautiful place out in the country

PSIM-1 Club

Post by oozitron » Fri Nov 29, 2019 6:36 pm

Being an owner of a PSIM-1, I often am asked about it and for sources of programs for it. There was a Yahoo PSIM group, but of course that is going away.

The concept of the PSIM is pure genius IMHO. As a musician who teaches programming to HS students, it's a match made in Frac Heaven to me. It's one just a few remaining non-DIY modules in my modular system.

I realize the PSIM-1 has a rocky past. Brice came to AHMW twice: 2004 (when he delivered mine) and 2005 IIRC. Many people put money down for a PSIM and most never got their module or their money back. Via his emails, I think Brice was overwhelmed by the project, and when he was starting to make headway he was involved in a motorcycle accident. The whole thing was very unfortunate.

That being said, this thread is for sharing PSIM programs and knowledge. Instead of uploading files, I would like to try copying & pasting the program text into a reply. That way it's easy to see and discuss.

If you "paste" a program, put any additional comments or instructions in a separate post prior to the actual program. Hopefully that will work out (?)

Andrew
Last edited by oozitron on Fri Nov 29, 2019 7:05 pm, edited 1 time in total.
Never want to come down, never want to put my feet back down on the ground

User avatar
oozitron
solder fume huffer
Posts: 806
Joined: Fri Jan 23, 2009 6:11 pm
Location: in a beautiful place out in the country

Post by oozitron » Fri Nov 29, 2019 6:43 pm

PSIM-1 Program: Quantizer

This is a quantizer that takes the voltage at input #1 and divides it up into 25 "zones". Then it uses a VLOOKUP function to assign an output voltage.

Unlike most quantizers, you can specify *any* 25 voltages (in any order) that you want. You can repeat the same output voltage several time in a row, which makes a wider "zone" and is easier (or more likely) to hit.

There is just one voltage input scanned, but all four outputs have their own list of 25 voltages. You could use this to play 25 different 4 note chords if you wanted to. Or add scanning to inputs 2~4 and have 4 separate quantizers.

Keep in mind that the output voltage is 32 = half step. So if 64 is an F, 96 will be an F#. Of course you can get quarter tones by using 64, 80, 96, etc.

Andrew
Never want to come down, never want to put my feet back down on the ground

User avatar
oozitron
solder fume huffer
Posts: 806
Joined: Fri Jan 23, 2009 6:11 pm
Location: in a beautiful place out in the country

Post by oozitron » Fri Nov 29, 2019 6:44 pm

'---------------------------------------------
'PUBLIC DOMAIN
'---------------------------------------------
'
'*****************************************************************
' Module: PSIM-1 REV1b
' Processor Type: Basic Micro - Basic Atom Pro24M
' Description: Quad 25 Step quantizer
' For 0-5 volt input - great for Fat Controller!
' Easily altered for 0-10 volt input (see line #122)
' Choose your own 25 notes for each output (see line #126)
' Chords can be generated by using multiple outputs
' Instructions: Press START
' IN 1 = Raw voltage input
' OUT 1-4 = One of 25 voltages from chosen note set
'
' Developed by Oozitron aka Andrew Scheidler
' Email: oozitron (at) gmail.com
' Special Thanks to Paul Perry for the Fat Controller
' Revision Date: 2005/3/15 11:07 PM
'*****************************************************************

' Basic Micro Atom Pro-24M Configuration
'
' (Note: P0 is I/O 0 and NOT pin 0 on the microprocessor.)
'
' P0 - Analog IN-1 (0-5 VDC)
' P1 - Analog IN-2 (0-5 VDC)
' P2 - Analog IN-3 (0-5 VDC)
' P3 - Analog IN-4 (0-5 VDC)
' P4 - START Button (Momentary Normally Open Switch)
' P5 - STOP Button (Momentary Normally Open Switch)
' P6 - I2C/SDA (Reserved) - J3 Pin 1
' P7 - I2C/SDL (Reserved) - J3 Pin 2
' P8 - AUX (Digital I/O - NO BUFFERING)
' P9 - STOP LED
' P10 - RUN LED
' P11 - DAC - LOADDACS
' P12 - DAC - SERDATA
' P13 - DAC - CLOCK
' P14 - RXD (Reserved) - J5 Pin 1
' P15 - TXD (Reserved) - J5 Pin 2

'************************************************************************
'Define Variables

LOADDACS CON 11 ' Pin OUT to DAC LOADDACS
SERDATA CON 12 ' Pin OUT Serial Data to DAC (16-bit)
CLOCK CON 13 ' Pin OUT to Clock DAC
STOPLED CON 9 ' Red LED
RUNLED CON 10 ' Green LED
BSTART CON 5 ' Start Button
BSTOP CON 4 ' Stop Button
AUX CON 8
ADC1 CON 0
ADC2 CON 1
ADC3 CON 2
ADC4 CON 3
MINFREQ CON 0 ' DAC - Sets to 0 VDC
MAXFREQ CON 4095 ' Maximum value for 12-bit DAC is 4096 (or 0 TO 4095)


RAWDAC1 VAR WORD ' RAW DAC DATA 1
RAWDAC2 VAR WORD ' RAW DAC DATA 2
RAWDAC3 VAR WORD ' RAW DAC DATA 3
RAWDAC4 VAR WORD ' RAW DAC DATA 4
DAC1V VAR WORD ' DAC Value to be Sent to DAC Channel
DAC2V VAR WORD ' DAC Value to be Sent to DAC Channel
DAC3V VAR WORD ' DAC Value to be Sent to DAC Channel
DAC4V VAR WORD ' DAC Value to be Sent to DAC Channel
ADC1V VAR WORD ' Value of Analog IN-1
ADC2V VAR WORD ' Value of Analog IN-2
ADC3V VAR WORD ' Value of Analog IN-3
ADC4V VAR WORD ' Value of Analog IN-4
I VAR WORD ' Misc counting variable
TEMPO VAR WORD ' TEMPO=1 Is Equal to 0.5ms ??? (Value 0 to 254)
BPM VAR BYTE ' Beats Per Minute (Value 0 to 254)
TONE VAR WORD ' Frequency in Hertz
FREQ VAR WORD ' Temporary Frequency Counter
WORK VAR BYTE ' Workspace for BUTTON instruction.
INDEX VAR BYTE

' My Variables
ADC1VHOLD VAR WORD ' Holds last unchanged value of Analog IN-1
I1 VAR WORD ' Note number for IN-1
I2 VAR WORD ' Note number for IN-2
I3 VAR WORD ' Note number for IN-3
I4 VAR WORD ' Note number for IN-4

'************************************************************************
'Initialize Module

DIRS = %1111110000000000 ' Configure Pins 1=input 0=output
OUTS = %1111111111111111 ' Configure State 1=low 0=high

WORK=0
TONE=440 ' Change this to frequency in Hz. to output from the AUX jack.
' This can be used as a tuning frequency to beat your VCO's
' against.

'BPM=300 ' Change this to how ever many Beats Per Minute you want.
'TEMPO=60000/BPM ' Do not change

GOSUB INIT

'************************************************************************

LOW STOPLED
LOW RUNLED

ADC1VHOLD = 0

RUN:
GOSUB SCANADC

' this ignores very slight changes to stop jitter
IF ABS(ADC1VHOLD-ADC1V) > 3 THEN
ADC1VHOLD = ADC1V
ENDIF

' for 0-5v use "/ 21" for 0-10v use "/ 42"
I1 = ADC1VHOLD / 21

' choose your output notes (voltages) by altering the numbers in the brackets (32 = half step)
' notes do not have to be ascending and can be repeated as desired
LOOKUP I1,[288,384,448,224,448,512,288,512,608,672,768,832,832,896,896,992,1056,1152,1216,1216,1280,1280,1376,1440,3968],DAC1V
LOOKUP I1,[288,384,448,224,448,512,288,512,608,672,768,832,832,896,896,992,1056,1152,1216,1216,1280,1280,1376,1440,3968],DAC2V
LOOKUP I1,[288,384,448,224,448,512,288,512,608,672,768,832,832,896,896,992,1056,1152,1216,1216,1280,1280,1376,1440,3968],DAC3V
LOOKUP I1,[128,192,256,320,384,448,512,576,640,704,768,832,896,960,1024,1088,1152,1216,1280,1344,1408,1472,1536,1600,1664],DAC4V

GOSUB LOADALLDACS
GOTO RUN

'************************************************************************
' SUBROUTINES - DO NOT MODIFY!
'************************************************************************

INIT:' by Brice D. Hornback - http://www.SynthModules.com
' Resets DAC values, flashes LEDs, then waits for Start button.
LOW RUNLED
GOSUB RESETDAC

FOR I=1 TO 12
TOGGLE RUNLED
PAUSE 50
TOGGLE STOPLED
PAUSE 50
NEXT
LOOP1:
TOGGLE STOPLED
PAUSE 100
IF IN4 = 1 THEN RUN
IF IN5 = 1 THEN ENDLOOP1
GOTO LOOP1
ENDLOOP1:
RETURN


RESETDAC:' by Brice D. Hornback - http://www.SynthModules.com
'Sets all DAC channels to 0V and refreshes all four DAC channels.
DAC1V=0
DAC2V=0
DAC3V=0
DAC4V=0
GOSUB LOADALLDACS
RETURN

LOADALLDACS: ' by Grant Richter of Wiard Synthesizer Company as of 17 Jan 2004
'Add addresses to values no speed improve with OR over +
RAWDAC1=DAC1V+49152
RAWDAC2=DAC2V+32768
RAWDAC3=DAC3V+16384
RAWDAC4=DAC4V
'shift out 16 bits mode 4 gotta bang loaddacs pin for each channel
'skew from ch. 1 to 4 = 400 usecs. Aprox 1 msec execution time for sub.
SHIFTOUT SERDATA,CLOCK,4,[RAWDAC1\16]
PULSOUT LOADDACS,1
SHIFTOUT SERDATA,CLOCK,4,[RAWDAC2\16]
PULSOUT LOADDACS,1
SHIFTOUT SERDATA,CLOCK,4,[RAWDAC3\16]
PULSOUT LOADDACS,1
SHIFTOUT SERDATA,CLOCK,4,[RAWDAC4\16]
PULSOUT LOADDACS,1
RETURN

SCANADC:' by Grant Richter of Wiard Synthesizer Company as of 17 Jan 2004
'load buffers with actual a/d values
ADIN ADC1, ADC1V
ADIN ADC2, ADC2V
ADIN ADC3, ADC3V
ADIN ADC4, ADC4V
RETURN

ENDPROGRAM: ' by Brice D. Hornback - http://www.SynthModules.com
' Resets all four DAC channels to 0V and runs INIT subroutine
LOW RUNLED
HIGH STOPLED
GOSUB RESETDAC
GOTO INIT
Never want to come down, never want to put my feet back down on the ground

User avatar
mamonu
90s ambient miscreant!!
Posts: 611
Joined: Tue Jul 20, 2010 4:08 pm
Location: Surrey, UK

Post by mamonu » Fri Nov 29, 2019 8:43 pm

Thanks for sharing this stuff oozitron

Hopefully I can share some of mine after I setup properly myself

(still waiting for my usb-to-RS232 cable after I ordered a wrong one *somehow* :doh: )

and start learning how to get resuts soon.

User avatar
chachi
Wiggling with Experience
Posts: 445
Joined: Fri Feb 22, 2013 11:50 am
Location: north portland, OR

Post by chachi » Fri Nov 29, 2019 9:39 pm

can you tell us more about what’s under the hood?

User avatar
oozitron
solder fume huffer
Posts: 806
Joined: Fri Jan 23, 2009 6:11 pm
Location: in a beautiful place out in the country

Post by oozitron » Fri Nov 29, 2019 10:27 pm

There's a BASIC AtomPro processor which you program with a form of BASIC.

The CPU is attached to 4 voltage inputs and 4 voltage outputs, plus a couple buttons and leds that can be used by your programs.

It's not designed to process audio, but it can. I'll post a program I wrote that digitizes audio into 4 bit audio. Very crunchy :-)

Most of my programs have been quantizers and sequencers. But you're only limited by your imagination and programming skills.

Andrew
Never want to come down, never want to put my feet back down on the ground

bitmonkey
Learning to Wiggle
Posts: 3
Joined: Fri Nov 05, 2010 7:18 pm
Location: United States

Re: PSIM-1 Club

Post by bitmonkey » Fri Nov 29, 2019 11:10 pm

Thanks, Andrew, I need this nudge! I was lucky enough to actually receive the PSIM-1 that I paid for.

In a way, it was a forerunner of the Disting. Much less powerful, but user programmable.

David Brown was an avid developer. I forget his Muffname but I think we are Facebook friends.

Cheers!

John Mahoney

User avatar
davebr
Veteran Wiggler
Posts: 662
Joined: Mon Sep 07, 2009 12:55 am
Location: Portland, OR USA

Re: PSIM-1 Club

Post by davebr » Sat Nov 30, 2019 1:19 am

bitmonkey wrote:David Brown was an avid developer. I forget his Muffname but I think we are Facebook friends.

Cheers!

John Mahoney
I did a lot of hardware and software development for the PSIM in a 5U format. I added MIDI, SpeakJet and the TTS256 text to speech, and an LCD display. I developed a set of drivers using interrupts including serial and timer, and developed some expansion boards using I2C.
PSIM 5U page
SpeakJet and TTS256 page
I2C Expansion page
LCD Display page

I was in contact with Brice and developed the LCD as a companion that he wanted to productize, but that never materialized.

My programs and code template are online. There are around 45 programs. BasicMicro changed the development environment and I had to upgrade all the programs so there are multiple versions of many of them. My most used program is my SuperSequencer.
PSIM and CVS Programs page

It really is a great product. They made a AtomPro28 which had 4 extra inputs. Myself, Grant Richter, and John Loffink embarked on a follow-up design called the CVS for ComputerVoltageSource. We added all the enhancements, expanded to 8 channels, and designed it for higher precision. We chose a better LCD and John took the implementation of that PCB. I did the CVS PCB. I designed it so at four channels it was code compatible with the PSIM. That is why on the programs page there are CVS, CVS-4 and PSIM programs. They are my most utilized and favorite modules.

All the hardware and software design is posted on the web. I did a couple of PCB runs but I don't think a lot ever got built. My conclusion was musicians were not programmers.
ComputerVoltageSource Module page
4 Channel CVS page
CVS LCD page

I did a Kurzweil ribbon implementation that works quite well.
CVS Kurzweil page

The AtomPro2X processors are now obsolete. I did some experimentation with an Arduino implementation. The DAC is I2C and the Arduino is hardware driven while the AtomPro2X is software driven so there is a reasonable improvement. However, the AtomPro2X serve my needs so I have never upgraded my modules.
Arduino CVS page

I now exclusively use my CVS modules. My PSIM has become a dedicated controller for my Circle Machine.
Circle Machine Sequencer page

Whew. Enjoy.

Dave

User avatar
mamonu
90s ambient miscreant!!
Posts: 611
Joined: Tue Jul 20, 2010 4:08 pm
Location: Surrey, UK

Post by mamonu » Wed Dec 04, 2019 2:13 pm

oozitron

I hope you post some more this weekend.


I need to understand the way the data from
IN1,IN2,IN3 could be clocked (perhaps using IN4 as a clock providing the BPM
instead of having it as a constant

ie get this part

'BPM=300 ' Change this to how ever many Beats Per Minute you want.
'TEMPO=60000/BPM ' Do not change


out of the init and into the loop

looking at the divider program from davebr now
to see how he does get the clocks :banana:

ps.. how can i put the link correctly godamit? :) :deadbanana:

User avatar
davebr
Veteran Wiggler
Posts: 662
Joined: Mon Sep 07, 2009 12:55 am
Location: Portland, OR USA

Post by davebr » Thu Dec 12, 2019 1:02 am

mamonu wrote:oozitron

I hope you post some more this weekend.


I need to understand the way the data from
IN1,IN2,IN3 could be clocked (perhaps using IN4 as a clock providing the BPM
instead of having it as a constant

ie get this part

'BPM=300 ' Change this to how ever many Beats Per Minute you want.
'TEMPO=60000/BPM ' Do not change


out of the init and into the loop

looking at the divider program from davebr now
to see how he does get the clocks :banana:

ps.. how can i put the link correctly godamit? :) :deadbanana:
Email me and I can walk you through it. Its been a long time since I have looked at that code. On the link, I sometimes have it work and sometimes not. It seems random. My email is on my website.

Dave

User avatar
mamonu
90s ambient miscreant!!
Posts: 611
Joined: Tue Jul 20, 2010 4:08 pm
Location: Surrey, UK

Post by mamonu » Tue Dec 17, 2019 8:34 pm

will do davebr !

User avatar
mamonu
90s ambient miscreant!!
Posts: 611
Joined: Tue Jul 20, 2010 4:08 pm
Location: Surrey, UK

Re: PSIM-1 Club

Post by mamonu » Sat Feb 08, 2020 5:53 am

Have downloaded the archive of PSIM programs before the YahooGroups went down.
They will be availiable on the URL below.

https://github.com/FracModular/PSIM-1-related


I will be adding more as I come in across them or make them!
frac & 100m & eurorack (equal opportunities wiggler)
-----------------------------------------------
:blacet: :blacet: fracmodular.github.io :blacet: :blacet:

Post Reply

Return to “Fractional Rack Modules”