electro-music.com   Dedicated to experimental electro-acoustic
and electronic music
 
    Front Page  |  Radio
 |  Media  |  Forum  |  Wiki  |  Links
Forum with support of Syndicator RSS
 FAQFAQ   CalendarCalendar   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   LinksLinks
 RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in  Chat RoomChat Room 
go to the radio page Live at electro-music.com radio 1 Please visit the chat
poster
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Reverse engineering USB protocol, NM1 to G2 converter
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 5 of 5 [120 Posts]
View unread posts
View new posts in the last week
Mark the topic unread :: View previous topic :: View next topic
Goto page: Previous 1, 2, 3, 4, 5
Author Message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24396
Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320

PostPosted: Sat Dec 16, 2006 6:52 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

qfingers wrote:
The uprate is what tells modules when to use audio rate processing instead of control rate.

Yes I got that aspect, I guess that the question was more like, why would you bother ? to get the cable colors OK ? For a moment I was thinking the G2 editor would fix that, but probably not, I think now.

Quote:
There are minor corrections I had to make but was no big deal.

When you could at some stage inform me about those errors I'd appreciate that, as it would allow me to make the documentation up to date. When however your priorities are somewhere else I'd understand Very Happy

Quote:
By the way, that example code is all that is needed to convert a module now.


It looks pretty readable to me (after just reading the python intro stuff), in the sense that the code seems self documenting. That can't be a feature of python, you're doing a great job I think !

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Sat Dec 16, 2006 7:11 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Blue Hell wrote:

Yes I got that aspect, I guess that the question was more like, why would you bother ? to get the cable colors OK ? For a moment I was thinking the G2 editor would fix that, but probably not, I think now.

It looked strange, like the module was functioning in control mode, but had audio rate signals connected. I've seen similar things with the editor and control-logic to audio-logic input signal. They don't always return to the control-logic rate after it's been disconnected. I think it's a bug. Which gets me to thinking. I nice feature/module for the next OS update would be a audio to control rate converter. I've had times where I wish I could run the signal at control rate with an input of audio rate. It would decrease CPU resources for those modules.

Quote:

When you could at some stage inform me about those errors I'd appreciate that, as it would allow me to make the documentation up to date. When however your priorities are somewhere else I'd understand Very Happy


I really hacked your file. I changed all the names to lowercase and changed some of the names. I will send you them though. It may be a quick fix in a decent editor (vim is my choise).

Quote:

It looks pretty readable to me (after just reading the python intro stuff), in the sense that the code seems self documenting. That can't be a feature of python, you're doing a great job I think !


Thanks! The code is pretty cool eh? I'll have you converted to python soon enough. I'm guessing you'll want to get involved when I get further along.

I split out all the converter objects into separate files for ease of maintainence. I grouped them the same as the NM1 tab bar to make it easier. I'm working on the In/Out group. I'll make my way through that, then to Osc, LFO, etc.. I'm going to skip the really complicated ones for now. Keyboard Patch was kinda ugly as it needed Keyboard, Status, and 3 Delayed Clock modules so I could get the Last * outputs. What a pain.
Anyways, back to coding. It's getting easier now.

q
Back to top
View user's profile Send private message
cappy2112



Joined: Dec 24, 2004
Posts: 2490
Location: San Jose, California
Audio files: 2
G2 patch files: 1

PostPosted: Sat Dec 16, 2006 7:26 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Quote:

It looks pretty readable to me (after just reading the python intro stuff), in the sense that the code seems self documenting. That can't be a feature of python, you're doing a great job I think !


Actually, simplicty and readability are some of Python's strengths.
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24396
Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320

PostPosted: Sat Dec 16, 2006 7:36 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

cappy2112 wrote:
Actually, simplicty and readability are some of Python's strengths.


un-mess-upable Shocked

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
cappy2112



Joined: Dec 24, 2004
Posts: 2490
Location: San Jose, California
Audio files: 2
G2 patch files: 1

PostPosted: Sat Dec 16, 2006 7:38 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
cappy2112 wrote:
Actually, simplicty and readability are some of Python's strengths.


un-mess-upable Shocked


After a few lines of Python, you'd never go back to Perl Smile
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24396
Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320

PostPosted: Sat Dec 16, 2006 7:49 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

cappy2112 wrote:
After a few lines of Python, you'd never go back to Perl Smile


Even without that I'd not ... I have like maybe a few thousands lines of perl on my companies server to maintain, that's not really like much, and I hate it, I hate it, I Evil or Very Mad

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Sat Dec 16, 2006 7:55 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Blue Hell wrote:
cappy2112 wrote:
After a few lines of Python, you'd never go back to Perl Smile


Even without that I'd not ... I have like maybe a few thousands lines of perl on my companies server to maintain, that's not really like much, and I hate it, I hate it, I Evil or Very Mad


Yes, but I've seen python code that is pretty ugly too. I was looking at the linux hack to handle input from a WiiRemote using bluez (linux bluetooth library) and pybluez. What a mess. It has lots of information in comments spread across arrays and functions, but it made the code really difficult to read. So you can poorly in python. I choose not to.

q
Back to top
View user's profile Send private message
Afro88



Joined: Jun 20, 2004
Posts: 701
Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79

PostPosted: Sat Dec 16, 2006 9:27 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Awesome job again qfingers. I wish I could help out, but I'm not much of a coder.

qfingers wrote:
It looked strange, like the module was functioning in control mode, but had audio rate signals connected. I've seen similar things with the editor and control-logic to audio-logic input signal. They don't always return to the control-logic rate after it's been disconnected. I think it's a bug. Which gets me to thinking. I nice feature/module for the next OS update would be a audio to control rate converter. I've had times where I wish I could run the signal at control rate with an input of audio rate. It would decrease CPU resources for those modules.


If I get what you're asking, look no further than the NoteQuantize module set to it's default values. Smile
Back to top
View user's profile Send private message Visit poster's website
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Sat Dec 16, 2006 9:34 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Afro88 wrote:
If I get what you're asking, look no further than the NoteQuantize module set to it's default values. Smile


A little hackish, but it does the job. Cool!!!

q
Back to top
View user's profile Send private message
blue hell
Site Admin


Joined: Apr 03, 2004
Posts: 24396
Location: The Netherlands, Enschede
Audio files: 296
G2 patch files: 320

PostPosted: Sun Dec 17, 2006 5:41 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Had overseen this one completely Shocked (was making some avi composer thingy yesterday, think the boss will be happy tomorrow).

qfingers wrote:
They don't always return to the control-logic rate after it's been disconnected. I think it's a bug.


Don't know, it's a feature sometimes as well I think. But you have to "break the loop" to return to control rate.

Quote:
I really hacked your file. I changed all the names to lowercase and changed some of the names. I will send you them though.

Ok, thanks in advance.

Quote:
I'll have you converted to python soon enough. I'm guessing you'll want to get involved when I get further along.


Who knows Very Happy

Quote:
I'm going to skip the really complicated ones for now. Keyboard Patch was kinda ugly as it needed Keyboard, Status, and 3 Delayed Clock modules so I could get the Last * outputs. What a pain.


Guess you could post some as interesting puzzles for the community ?

_________________
Jan
also .. could someone please turn down the thermostat a bit.
Posted Image, might have been reduced in size. Click Image to view fullscreen.
Back to top
View user's profile Send private message Visit poster's website
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Sun Dec 17, 2006 6:19 pm    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Blue Hell wrote:

qfingers wrote:
They don't always return to the control-logic rate after it's been disconnected. I think it's a bug.


Don't know, it's a feature sometimes as well I think. But you have to "break the loop" to return to control rate.

I think it would be better to allow the user to turn on/off things like this. Yes it's nice to be able to change the rate. But I would prefer a less "backwards" way to do it.
Blue Hell wrote:

qfingers wrote:

I really hacked your file. I changed all the names to lowercase and changed some of the names. I will send you them though.

Ok, thanks in advance.

I am changing some of the params of patch303.txt to closer match the G2. It allows an easier convertion process. For example, instead of FMA, and FMB for oscillators, I'm changing it to Fm becuase it easier for me to remember and it helps in sharing code. I can still make adjustments to the parameters, I just prefer a standard naming scheme.

Blue Hell wrote:

qfingers wrote:

I'm going to skip the really complicated ones for now. Keyboard Patch was kinda ugly as it needed Keyboard, Status, and 3 Delayed Clock modules so I could get the Last * outputs. What a pain.


Guess you could post some as interesting puzzles for the community ?


Well, I think I'm going to do a quick (not so quick) setup of all the modules and converters correct or incorrect, implemented and not implemented. Then post the code. Because the module converter is more or less self contained, people who want to get involved can help write, correct, and bug fix the module converters. I will have enough examples to help in the conversion process. Plus I can offer help for really esoteric conversions. Because I would like to start working on the optimizations.

I have to search the cables netlist (which is build when the patch is loaded) and write an algorithm to automatically update the "uprate" parameter (the one that changes processing of control signals to processing audio signals). I also want to add a handling a configuration file so customizations can be done to the patch after it's been converted (or during). Some things may just be easier to handle that way then trying to code and algorithm to handle the really weird connections and parameter settings. Lastly, I wanna at least handle removing the Mst/Slv cables when they are only tied together.

I'm wondering if another thread may be better since this one is full of many other non-converter code related issues. How about a separate discussion on the converter? So there can be a topic per NM1 module with changes, fixes, opinions, etc. And one for the main converter for optimization ideas. Why do you guys think? I think this kind of information should be kept together (and hopefully organized). And there is alot of it.

q
Back to top
View user's profile Send private message
tombola



Joined: Mar 11, 2005
Posts: 84
Location: London
Audio files: 3
G2 patch files: 9

PostPosted: Mon Dec 18, 2006 6:59 am    Post subject: Reply with quote  Mark this post and the followings unread

This is really exciting, again.

How long before you can post comparison audio samples - the original patch on a G1, the converted patch on a G2?

_________________
http://www.musicthing.co.uk/
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 18, 2006 7:20 am    Post subject:
Subject description: Q!
Reply with quote  Mark this post and the followings unread

Blue Hell wrote:

Quote:
I'm going to skip the really complicated ones for now. Keyboard Patch was kinda ugly as it needed Keyboard, Status, and 3 Delayed Clock modules so I could get the Last * outputs. What a pain.


Guess you could post some as interesting puzzles for the community ?


I could have a look at that, some time ago I did a lot of thinking about modular polyphony (and related matters).

This does give me a idea, maybe in the interest of optimisation (of the G2 load, not Python's...), the harder, more elaborate conversions could use conditionals. It makes no sense to make a big sub-patch to emulate a afeature that may not get used. In the same vein; patches in the NM that use loads of logic could probably be simplified on the G2 which has some more logical processors, I think.

That would involve some fairly heavy duty logic to get it to work though.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
dasz



Joined: Oct 16, 2004
Posts: 1644
Location: victoria, canada
Audio files: 29
G2 patch files: 56

PostPosted: Mon Dec 18, 2006 8:29 am    Post subject: Reply with quote  Mark this post and the followings unread

qfingers,

a thought occured to me. if some conversions require building blocks, then the patches which do not exceed 100% on a NM Classic, may exceed 100% on a G2.

also, instead of you decoding & coding all the innards of each module (there are more than 100 on the classic), then perhaps you could distribute the module coding and decoding responsibilities to others to take ownership of some modules, for a quicker result. I'm sure there are other python folks out here.

/Dasz
ps.: It looks like there are more cats on this forum again - hi cappy2112!
Back to top
View user's profile Send private message
Kassen
Janitor
Janitor


Joined: Jul 06, 2004
Posts: 7678
Location: The Hague, NL
G2 patch files: 3

PostPosted: Mon Dec 18, 2006 8:34 am    Post subject: Reply with quote  Mark this post and the followings unread

dasz wrote:
qfingers,

a thought occured to me. if some conversions require building blocks, then the patches which do not exceed 100% on a NM Classic, may exceed 100% on a G2.


That's not the real issue, the real issue, I wager, is the zero page.

I think the G2 has a single zero page adress less then the NM too.

This is not a huge issue for practical patching since the G2 also has higher-level modules which can often be used to optimise zero page usage compared to the NM, howver that's often the sort of optimisation which benefits from clever patching. Emualting that sort of cleverness is not at all easy.

_________________
Kassen
Back to top
View user's profile Send private message Send e-mail Visit poster's website
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Mon Dec 18, 2006 11:12 am    Post subject: Reply with quote  Mark this post and the followings unread

Kassen wrote:
dasz wrote:
qfingers,

a thought occured to me. if some conversions require building blocks, then the patches which do not exceed 100% on a NM Classic, may exceed 100% on a G2.


That's not the real issue, the real issue, I wager, is the zero page.

I think the G2 has a single zero page adress less then the NM too.

This is not a huge issue for practical patching since the G2 also has higher-level modules which can often be used to optimise zero page usage compared to the NM, howver that's often the sort of optimisation which benefits from clever patching. Emualting that sort of cleverness is not at all easy.


I'm not concerned with 100% usage currently. We are not even close to that issue. There are a ton of module convertions to be done. I'm going to create either a quick module converter or a stub for every NM1 module. Each block has a separate "class" with code to convert the parameters, and setup the input ports and output ports. Then the converter will take the NM1 cable list, use module index and parameter index to build a new cable list for the G2. So the converter "class" and code, is what determines which G2 module to connect to. That allows the convert object to define how the G2 sub-structure is mapped. All the optimizations can be done within it. One problem I've been seeing is that many Osc modules allow 2 pitch inputs with separate modulation values. This has to be built out of a 2 input mixer and routed to the variable pitch modulation input. If only one of the pitch modulation inputs is used, I can use the module as is without the extra mixer.

I have all the module converters broken out to separate python modules for each NM1 editor tab. I will eventually breakout each module converter to it's own single python source file. Once I have that done with all the stubs and converted modules, I will release the code into the "wild". What I want to see is people to send me through email (or this forum) python source for updated converters for stuff I have wrong, optimizations, or completed converters. I will be in charge of fixing and updating the main converter application as and converter module problems. I was thinking about sourceforging this or some other open source repository. I'm still looking into it.

Anyone who wants to work on the project has to send me email for the request. Please send me a message so I can get a count of how many people want to work on this. I not sure how I want to manage the project yet. It may be email patching of the source only with sourceforge just for the released software.

Right now, I use a source code management program called mercurial http://www.selenic.com/mercurial/wiki/. I'm in search of a hosting site that supports mercurial. If I find one, that will be what want I use. Otherwise I may have to resort to svn. Still looking.

q
Back to top
View user's profile Send private message
Afro88



Joined: Jun 20, 2004
Posts: 701
Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79

PostPosted: Mon Dec 18, 2006 3:17 pm    Post subject: Reply with quote  Mark this post and the followings unread

qfingers wrote:
I was thinking about sourceforging this or some other open source repository. I'm still looking into it.


That sounds like a good idea, if only for the built in cvs functions that will keep a history of code changes for you. I know of a few people who swear by cvs, especially when there are random people sending in bits of code and updating modules for you.
Back to top
View user's profile Send private message Visit poster's website
cappy2112



Joined: Dec 24, 2004
Posts: 2490
Location: San Jose, California
Audio files: 2
G2 patch files: 1

PostPosted: Mon Dec 18, 2006 3:44 pm    Post subject: Reply with quote  Mark this post and the followings unread

[quote="Afro88"]
qfingers wrote:

I know of a few people who swear by cvs


I know some people who swear at cvs (an I'm one of them) Smile
Unfortunately, it's the vc of choice used by all the software & firmware engineers where i work.
Back to top
View user's profile Send private message
qfingers



Joined: Nov 16, 2006
Posts: 186
Location: Tucson, AZ
G2 patch files: 2

PostPosted: Mon Dec 18, 2006 7:59 pm    Post subject: Reply with quote  Mark this post and the followings unread

Afro88 wrote:
qfingers wrote:
I was thinking about sourceforging this or some other open source repository. I'm still looking into it.


That sounds like a good idea, if only for the built in cvs functions that will keep a history of code changes for you. I know of a few people who swear by cvs, especially when there are random people sending in bits of code and updating modules for you.


I've used cvs and prefer mercurial. I am already managing my sources. It's just a matter of allowing others to as well. I don't care for central repositories becuase there is too many chances to mess up the repository. Mercurial is distributed. This way only the local repository can get corrupted. I may just prefer email and patches. This way I don't have to be tied to a host. I might also consider svn but not cvs. Right now, I want to finish, post the result, and have people send me patches. I may use my own server to host stuff. I am on a high-speed internet connection but it only allows https to get through and ssh.

Let's see how many people want to code. Testers and module suggestions and fixes can come from this forum or another one. The coder are the only ones who need respository access and maybe not even that. If I only have 2 or 3 coders, I'm not going to bother. Then I'll probably use sourceforge or savannah to post the releases and that's it.

q
Back to top
View user's profile Send private message
noisevoid



Joined: May 13, 2015
Posts: 8
Location: san jose
G2 patch files: 1

PostPosted: Fri Aug 07, 2015 9:21 pm    Post subject: Reply with quote  Mark this post and the followings unread

QFINGERS! WHERE HAVE YOU GONE?! WHAT HAS HAPPENED!?
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic Moderators: Nord Modular Editors
Page 5 of 5 [120 Posts]
View unread posts
View new posts in the last week
Goto page: Previous 1, 2, 3, 4, 5
Mark the topic unread :: View previous topic :: View next topic
 Forum index » Clavia Nord Modular » Nord Modular G2 Discussion
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


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