Git Product home page Git Product logo

dx7-supercollider's Introduction

DX7-Supercollider

My accurate Yamaha DX-7 clone. Programmed in Supercollider.

This is a super-exact clone of DX7 in SC environment. This project began with my internship at the STEIM during the last year; I was able to get my hands on an original DX7 synth and eventually found out that this instrument has this mystic / unusual sound. So I started fiddling with it and did some experiments with Supercollider. After a while, it became an obsession to play with it and started to copy parts of its synth mechanism just to flex my DSP muscles. Sooner, I found myself in this vast project to clone the entire thing. After 2-3 months of implementing process and lots of sleepless nights. I was able to clone the entire DX7 engine with very high accurate results. Other than the DX7’s vintage sound hiss, it is hard to distinguish between the clone and the original one on the same presets. For my use, I collected some 16384 (2^14) DX7 Sysex bank presets from the internet and converted it to some integer sequences to read it from Supercollider. I am also combining this clone with this 16384 preset package. Currently, I am using it with my sequencers to modulate its parameters, but for everyone's ease of use, I implemented a very basic function call. Which calls notes with this format: [Midi note, velocity, preset number]. Additional documentation is in the file. Have fun!

Getting Started

You don't need to open the DX7.afx file. It just needs to be in the same directory as the DX7.scd. Just open the DX7.scd in Supercollider and run the big chunk of code starting from the line 35 and it's ready to use. Then run the mainCaller functions for new notes and to close notes send zero velocity from the mainCaller functions.

Prerequisites

The only requirement is to install the SC3-Plugins Ugen library because I use the FM7.ar Ugen at the heart of all operation.

SC3-Plugins

Sound Examples

Here are some sound examples which calls a random preset for each new node:

Example

You can try these kinds of example by running the code at the very end of the DX7.scd file.

Basic MIDI implementation

It’s a very straightforward process; the preset number selection can be made by two different MIDI CCs. At total 128 * 128 = 16384 number is needed, which makes you able to choose the entire library of presets (2 ^ 14). Code format example:

( // init
	s.boot;
  ~mainCaller = ("./DX7.scd").loadRelative.wrapAt(-1);
)
(
var presetz = Array.fill(128, 63);

MIDIdef.noteOn(\DX7, {arg vel, note;
	~mainCaller.value(note, vel, (presetz[0] * 128) + presetz[1]);
},srcID:~midiInINST4,chan:2).add;

MIDIdef.cc(\DX7CC, {arg ...args;
	presetz[args[1]] = args[0];
},(0..1),srcID:~midiInINST4,chan:2).add;

MIDIdef.noteOff(\DX7off, {arg vel, note;
	~mainCaller.value(note, 0);
},srcID:~midiInINST4,chan:2).add;
)

Things to be implemented

  • Real time parameter modulation
  • Loading custom DX7 presets
  • Some cosmetic updates.

License

This project is licensed under the GNU General Public License v3.0 - see the LICENSE.md file for details

Acknowledgments

  • Hat tip to John Chowning
  • STEIM for letting me use their DX7 and espresso machine.
  • and all the anonymous preset makers for the Yamaha DX7 (unsung heroes/angels).

Author

dx7-supercollider's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dx7-supercollider's Issues

Problems playing the DX with a Pfunc.

Works a few times then I get and error

I load the DX function.

( // init
// Server.killAll
s.boot;
~mainCaller = ("./DX7.scd").loadRelative.wrapAt(-1);
)

(
~patt = Pbind(
\degree, Rest, // make pattern silent
\dur, Pseq([1,3,7,2], inf),
\note, Pseq([50,52,64], inf),
\vel, Pseq([80,50,10,127], inf),
\preset, Pseq([2333,3355,33556], inf),
\put, Pfunc({|values|
~mainCaller.value(
values.note,
values.vel,
values.preset)
})
).play(TempoClock(65/60*4));
)
~patt.stop;
~patt.pause;
~patt.resume;
~patt.free;

After a few runs I get this error. I think it is writing to the DX.afx file.

Not sure. HELP


ERROR: Message 'at' not understood.
RECEIVER:
nil
ARGS:
Integer 0
PATH: /Applications/SuperCollider/DX7-Supercollider-master/example.scd

PROTECTED CALL STACK:
Meta_MethodError:new 0x10b52df80
arg this = DoesNotUnderstandError
arg what = nil
arg receiver = nil
Meta_DoesNotUnderstandError:new 0x10b52ff40
arg this = DoesNotUnderstandError
arg receiver = nil
arg selector = at
arg args = [ 0 ]
Object:doesNotUnderstand 0x1097627c0
arg this = nil
arg selector = at
arg args = nil
a FunctionDef 0x10faa7808
sourceCode = ""
arg item = 0
Integer:do 0x10dfd1940
arg this = 145
arg function = a Function
var i = 0
a FunctionDef 0x10faa7938
sourceCode = ""
arg x = 64
arg y = 10
arg z = 33556
a FunctionDef 0x10e560840
sourceCode = ""
Function:prTry 0x10b888640
arg this = a Function
var result = nil
var thread = a Routine
var next = nil
var wasInProtectedFunc = false

CALL STACK:
DoesNotUnderstandError:reportError
arg this =
Nil:handleError
arg this = nil
arg error =
Thread:handleError
arg this =
arg error =
Thread:handleError
arg this =
arg error =
Thread:handleError
arg this =
arg error =
Object:throw
arg this =
Function:protect
arg this =
arg handler =
var result =
Environment:use
arg this =
arg function =
var result = nil
var saveEnvir =
< FunctionDef in Method Pbind:embedInStream >
arg i = 10
var name = 'put'
var stream =
var streamout = nil
Integer:forBy
arg this = 0
arg endval = 11
arg stepval = 2
arg function =
var i = 10
var j = 5
Pbind:embedInStream
arg this =
arg inevent =
var event =
var sawNil = false
var streampairs = [*12]
var endval = 11
Routine:prStart
arg this =
arg inval =
^^ The preceding error dump is for ERROR: Message 'at' not understood.
RECEIVER: nil

Syntax error?

When running your code I get this error:

`ERROR: syntax error, unexpected VAR, expecting NAME or WHILE
in interpreted text
line 268 char 4:

var lfo, pitchenv, output, randomlfo, multiPitch, lfoAmp;

^^^`

will lfo synths ever be freed?

Something in the LFO section seems to be wrong:

FreeSelf normally frees when triggered, so when the gateis set to 1 -- do you really wnat that?
https://github.com/everythingwillbetakenaway/DX7-Supercollider/blob/master/DX7.scd#L304

Setting a Synth's controls is in pairs, not sure if this will ever work here:
https://github.com/everythingwillbetakenaway/DX7-Supercollider/blob/master/DX7.scd#L666

As I'm not sure how it is supposed to work exactly, I didn't give an alternative, just point this out.

Thanks again for publishing this, btw.!

Make importable

Example:

(
    a = ("./DX7.scd").loadRelative.wrapAt(-1);
    // Note On 80 message with velocity value 100 and preset value 10000
    a.value(80, 100, 10002);
)

method Object:asInt is deprecated and will be removed

After getting this warning I replaced all occurrences of the asInt method with asInteger and then the warning disappeared and all functionality was there. After getting this warning I replaced all occurrences of the asInt method with asInteger and then the warning disappeared and all functionality was there.

Missing args to synthdefs

Also putting this on supercollider's repo (supercollider/supercollider#3466)

If you add s.dumpOSC to the example code, you'll see that it's not creating InfEfx with all the args it requires:

[ 9, "InfEfx", 1001, 2, 1000, "lfo_speed", 4.80054, "lfo_wave", 4,"lfo_phase", 1.5708, "envTrig", 0, "envTrig", 1, "pitchCons", 0.297928, "lfoGet1", 0, "lfoGet2", 1, "tameM", 1, "tameC", 0, "lfo_delay", 1.72212, "lfo_amd", 0 ]

This is missing pitch, gate, lfo_pmd, and more (these are args without defaults).

This may be causing supernova to segfault.

How to use?

Very cool project!

Really wanting to play around but could not figure out what app I'm supposed to open this in. The extensions are associated with image editing and tax software, lol. How are you running this bad boy?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.