| Author |
Message |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24493 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Thu Dec 14, 2006 6:25 pm Post subject:
|
 |
|
| qfingers wrote: | | Where was the term over? |
We non americans do our best, but we're just not as good in understanding the fine details of difference in meaning between "on" and "over". I mean ... I'm not. Please have mercy  _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Thu Dec 14, 2006 7:31 pm Post subject:
|
 |
|
| 3phase wrote: |
But even when you dont intend to do so, the names of the original authors would be removed in many cases when you remove patches out of theire creators folders... |
Not nesicarily. If this program is batch-converting the whole thing it inherently needs to be aware of the name of the sub-folder it's currently dealing with.
It should be quite possible to get the patch-creator's name from the name of the folder the patch is in, check wether that name was already in the comments field of the patch and if not put it there. I don't think this poses any big technological problems, in fact it could easly add names to patches that don't have one yet, asuming they were categorised correctly in the first place. Patche with no name of the author that were categorised incorectly would be a different matter but we can't expect poor qfingers to be psychic in adition to volunteering for this. Onother option would be simply leaving the folder structure intact.
About "on" and "over"; translations are tricky business  _________________ Kassen |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Thu Dec 14, 2006 8:05 pm Post subject:
|
 |
|
| Kassen wrote: |
Not nesicarily. If this program is batch-converting the whole thing it inherently needs to be aware of the name of the sub-folder it's currently dealing with.
|
Since I'm doing my development in linux, a one liner is all that will be necessary. Basically it will be a command like:
| Code: |
find nm1patches -name '*.pch' -print0|xargs -0 -i ./nm2g2.py "{}" "{}2"
|
That will convert the whole thing in one swoop. I do things like this all the time and the reason I use linux. I can explain it in more detail if your interested. Mac OSX has the same capability though it's not known for it.
q |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Thu Dec 14, 2006 9:36 pm Post subject:
|
 |
|
Well, I'm posting this from my Debian (DeMuDi) desktop so I can think of some more reasons to run Linux as well
I'll be fine but thanks! _________________ Kassen |
|
|
Back to top
|
|
 |
cappy2112

Joined: Dec 24, 2004 Posts: 2498 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Fri Dec 15, 2006 12:55 am Post subject:
|
 |
|
| Kassen wrote: |
Not nesicarily. If this program is batch-converting the whole thing it inherently needs to be aware of the name of the sub-folder it's currently dealing with.
It should be quite possible to get the patch-creator's name from the name of the folder the patch is in |
| qfingers wrote: |
Code:
find nm1patches -name '*.pch' -print0|xargs -0 -i ./nm2g2.py "{}" "{}2"
|
Unfortunately, the command interpreter on Windows machines pales in comparison to any *nix shell.
However, getting the name of the directory from a Python script is as easy
as
from os.path import basename
basename("/home/patchdude/")
patchdude # will be displayed, and can be appended to any string
Iterating through a tree of directories would take about 10 or so lines of Python code.
cygwin and other implemenations of unix shells & cmd line utils are also available for Windows, so the find utility could also be invoked on a Windows machine to process patches. But this is not as clean as a native *nix shell, and there may be some side affects. |
|
|
Back to top
|
|
 |
Afro88

Joined: Jun 20, 2004 Posts: 701 Location: Brisbane, Australia
Audio files: 12
G2 patch files: 79
|
Posted: Fri Dec 15, 2006 1:59 am Post subject:
|
 |
|
| cappy2112 wrote: | No it's not a lot of work at all. It can be done with 5-8 lines of code.
I wasn't asking him specifically to convert & credit each patch by hand, just suggesting a mechanism to credit the original author. It would be done automatically as the patch is converted.
In the NM1 patch archive, the one sorted by Author's Name, the most of the patch filenames names do not have references to the author.
Regardless, pulling the string with the Author's name from the filename, directory name, or inside the notes field in the patch, is easily done. |
Please don't take what I said as a personal attack, I honestly didn't mean it that way. I just didn't realise he was going to be converting patches direct from the archive - I thought he was going to just release the app (as I said in my post). So yes, I agree it would be trivial to include the authors name from the subdir when converting direct from the archive.
Regardless, for those that will be converting patches themselves with the app (say from a folder of favourite patches on their drive or something), I still think it would be worthwhile to retain module names, filename and text block information. |
|
|
Back to top
|
|
 |
Kassen
Janitor


Joined: Jul 06, 2004 Posts: 7678 Location: The Hague, NL
G2 patch files: 3
|
Posted: Fri Dec 15, 2006 5:26 am Post subject:
|
 |
|
| cappy2112 wrote: |
cygwin and other implemenations of unix shells & cmd line utils are also available for Windows, so the find utility could also be invoked on a Windows machine to process patches. But this is not as clean as a native *nix shell, and there may be some side affects. |
True, but you can simply list python as a requirement, that's what SuperCollider on Windows used to do.
I would already be quite impressed if Q managed to pull this off on some percentage of the archive on his own Linux box though, never mind possible future ports for private directories. _________________ Kassen |
|
|
Back to top
|
|
 |
Fozzie

Joined: Jun 04, 2004 Posts: 875 Location: Near Wageningen, the Netherlands
Audio files: 8
G2 patch files: 49
|
Posted: Fri Dec 15, 2006 5:29 am Post subject:
|
 |
|
Qfingers indicated several times that he plans to leave the folder structure intact for the converted patches. I therefore see no reason why he should include the folder name (=author name) in the patch; it is not there in the archive now, why should it be included in the converted patch? _________________ Spinning at ~0.0000115740740741 Hz |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Fri Dec 15, 2006 6:52 am Post subject:
|
 |
|
Well, I'm sure the size of the file will not allow me to post it here. We will have to figure out where to put it. I'll probably talk with you guys on how to release it. I just thought since I'm doing all the work, testing on the collection, why not release it too?
Something funny... will my "G2 patch files:" list be the largest number in the group? I'm mean you guys should get busy creating patches to catch up to 27000 (or whatever number I get to convert) patches.
As fas as the batch converting repositories of patches, I can add code and flags to command-line to handle directories. Something like:
| Code: |
./nm2g2.py -r directory
|
This would recursively (go through all files and directories under the directory), and convert them. It's a simple addition to the prorgram. This way it will convert all .pch files to .pch2 files handling to renaming of the patches along the way.
q |
|
|
Back to top
|
|
 |
3phase

Joined: Jul 27, 2004 Posts: 1189 Location: Berlin
Audio files: 13
G2 patch files: 141
|
Posted: Fri Dec 15, 2006 6:58 am Post subject:
|
 |
|
Sorry.. on and over can be the same word in german in some occasions..havent got it wright... Probably you coders have a better eye for syntax anyway...
But independent from missunderstandings and arguing a bit around there is a usefull idea in that.
I think it would be very cool when the text modules do the job... just with the name of the folder where the patch original came from, instead of crediting me
This would be very usefull because i often came along unnamed patches that was very good and i would have liked to find more of that specific author...
It would not only preserve the integrity of the lib..it would improove its state if the converter would repair what lots of the authors forgot...
to sign theire patches within the editor by naming a module...
When you can include such a function that drops a textmodule of the name of the creators folder without big hazzle it would be a very nice crossreference feature. |
|
|
Back to top
|
|
 |
3phase

Joined: Jul 27, 2004 Posts: 1189 Location: Berlin
Audio files: 13
G2 patch files: 141
|
Posted: Fri Dec 15, 2006 7:03 am Post subject:
|
 |
|
There is another problem...
How to include the converted files into the G2 lib on this page?
This is probably not so easy possible when each patch needs an own thread...
maybe a special section for the converted patches like the one for the NM1 archive?
I think that would be usefull...even when the patchcount for the creator of the converter dont goes up that way  |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Fri Dec 15, 2006 8:38 am Post subject:
|
 |
|
| 3phase wrote: | There is another problem...
How to include the converted files into the G2 lib on this page?
This is probably not so easy possible when each patch needs an own thread...
maybe a special section for the converted patches like the one for the NM1 archive?
I think that would be usefull...even when the patchcount for the creator of the converter dont goes up that way  |
I'll write a script the creates 27000 forum posts. It'll probably take a day or two... Just kidding. Maybe the collection can be split up by author or sub-directory. I don't think there is categories stored in the patch files so that is not an option. My guess is the collection size will be too big to post if it was in one big file. The 2006_10_14.zip collection from this forum weight in 9 meg. The original NM1 patch collection was 45 meg. It will be closer to 45 meg in size. Maybe someone's G2 web site can store them.
As far as authorship is concerned, I'm not going to spend the time to makeup or find the author of the patch that doesn't already have one. I will use author's subdirectory or whatever he/she uses when labeling the modules. I want the patch be as close as possible. It's the best I can do with a script. One thing I was thinking of was to write another program to compare patch structures and perhaps combine equivalently structured patches into variations with NameBars indicating the source NM1 patches. This will happen after this project is further along.
I'm trying to automate much of the process so if the patches are really corrupted or badly sounding, a fix to the converter and a rerun against all the patches would be all that is necessary to hopefully correct the problem. That's why I'm hoping to version stamp the collection and each patch with the converter version. This way it can be tracked as to what version was used to create the patch.
q |
|
|
Back to top
|
|
 |
cappy2112

Joined: Dec 24, 2004 Posts: 2498 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Fri Dec 15, 2006 9:02 am Post subject:
|
 |
|
| Fozzie wrote: | | Qfingers indicated several times that he plans to leave the folder structure intact for the converted patches. I therefore see no reason why he should include the folder name (=author name) in the patch; it is not there in the archive now, why should it be included in the converted patch? |
It depends which archive you are looking at.
There is one 45MB zip file which is sorted by author, another which is sorted by genre or category |
|
|
Back to top
|
|
 |
cappy2112

Joined: Dec 24, 2004 Posts: 2498 Location: San Jose, California
Audio files: 2
G2 patch files: 1
|
Posted: Fri Dec 15, 2006 9:11 am Post subject:
|
 |
|
| Afro88 wrote: |
Please don't take what I said as a personal attack, I honestly didn't mean it that way.
|
Not at all
For a bit there seemed to be disagreement on the original author being credited or not. I was trying to illustrate that it could be done very easily, if it was "commonly agreed upon" . |
|
|
Back to top
|
|
 |
jamos

Joined: Jun 01, 2004 Posts: 514 Location: Eugene, Oregon, USA
Audio files: 4
G2 patch files: 41
|
Posted: Fri Dec 15, 2006 11:57 am Post subject:
|
 |
|
| I'd love to see the USB protocol reverse-engineered and made public; then it would be possible to create a useful Windows program to actually back up sounds in my G2s, rather than relying on the just-plain-goofy system built into the editor. I lost a great performance last week by accidentally overwriting it; and since the bank transfer procedure is so screwy and buggy, I no longer even try to use it, so I had no backup. |
|
|
Back to top
|
|
 |
ian-s

Joined: Apr 01, 2004 Posts: 2672 Location: Auckland, New Zealand
Audio files: 42
G2 patch files: 626
|
Posted: Fri Dec 15, 2006 1:00 pm Post subject:
|
 |
|
This is not intended as a criticism of your project, which I think is an extremely valuable contribution to the community.
27000 patches would take a long time to check out. If you tried a new patch every two minutes for 7 hours a day, 7 days a week it would take more than 18 weeks. I’m sure given the quality of some of the contributors to the collection, that it contains some great and/or interesting patches. A few might even use ideas that haven’t already been used in a new G2 patch.
The question is, how do you find the good ones among all the “why doesn’t this work” or “variation 513 of that JMJ patch” posts?
Maybe it would be better to get a few NM1 owners to contribute their ‘A and B lists’ and convert just those.
It would create a smaller but perhaps more useful resource. |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Fri Dec 15, 2006 3:07 pm Post subject:
|
 |
|
| g2ian wrote: | This is not intended as a criticism of your project, which I think is an extremely valuable contribution to the community.
27000 patches would take a long time to check out. If you tried a new patch every two minutes for 7 hours a day, 7 days a week it would take more than 18 weeks. I’m sure given the quality of some of the contributors to the collection, that it contains some great and/or interesting patches. A few might even use ideas that haven’t already been used in a new G2 patch.
The question is, how do you find the good ones among all the “why doesn’t this work” or “variation 513 of that JMJ patch” posts?
Maybe it would be better to get a few NM1 owners to contribute their ‘A and B lists’ and convert just those.
It would create a smaller but perhaps more useful resource. |
If those lists are text files, I can create the collection however is best. It can be done later on just as well. Plus the list (if one such thing exists) can be used as a map of places to explore within the collection. I would prefer to have the full collection, and the lists so I can find the patches myself, then a subset of the whole collection and wish there were patches that are missing from the list that I like.
I don't think I'll be able to convert the whole collection anyways. It'll be a subset. As I said before, I hope to reach 80%. That may not even be possible. I might hit 90% or even 100%, but you hit the law of diminishing returns as you have to code a lot more for a few those last few. It may be better to do them by hand. I'm really interest to see how many patches the thing will convert correctly.
The other possibility is to have 27 people look at 1000 patches each. There are enough people in this forum to find 27 to do a little work. Even 20 would be ok. We can divide it up as necessary.
q |
|
|
Back to top
|
|
 |
3phase

Joined: Jul 27, 2004 Posts: 1189 Location: Berlin
Audio files: 13
G2 patch files: 141
|
Posted: Fri Dec 15, 2006 4:59 pm Post subject:
|
 |
|
You might hit 100% beeing converted but my gues is that without some deeper research that replaces certain modules with building blocks most of the patches will sound very different...
I tried to convert some of my patches manually and the straight conversion was only in 50% close...
But i ve to admit that most of my patches make use of special NM1 features like the spectraal oscilator..
I was never able to reproduce the curve of the mod FM input of that Oscillator propperly with the G2... but it might be posible with the wright mathematical function applied to the input.
Maybe i give it a try again.. independant from your patch converter i still miss the old spectral osculator a lot... It rises level when the wave form shape is altered.. opposite to the equal level on the G2 shape osc.
And the FM function is totaly different.
Patches that use grey cables for other uses than oscilator syncing wont be convertable at all.. even the sync feature needs some extra logic.
Have you allready steped into this kind of problems or is your converter still one:one based? |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Fri Dec 15, 2006 6:04 pm Post subject:
|
 |
|
| 3phase wrote: | Y
Have you allready steped into this kind of problems or is your converter still one:one based? |
Hey, I'm not that fast. I've got the read support for .pch files completed. I've got read/write support .pch2 files completed. I need to change some of the internals of the module structure so it's easier to specify connections and parameter settings. I've written a some test programs that generate a couple of modules and connect them together. This part works. Next is starting to create a function for each NM1 module that builds the appropriate module sub-structure and interconnects the cables to the correct inputs/outputs of the sub-structure. This is where alot of work will be done. Once I have all the modules that are one-to-one mappings. That will be the first version. Any patches with unknown modules (Spectral Osc, Filter Bank, etc..) will not be converted. I think alot of the modules are this easy. I'm guessing 10% of the NM1 modules don't have equivalant G2 modules. I could be wrong though. The only other thing will be to check the connections of the grey cables. If it's just master to slaves, I just ignore them because the G2 optimizes this out. Time will tell.
I will probably post example code for the converter for the simplest modules so people with a little programming experience see and possibly help with adding the more complex module conversions. After that, I will begin other optimization steps, and frequency, time, and modulation convertion tables for the oscillators, filters, etc... After we have 100% of the module conversion functions, then I'll run the converter across the whole patch collection again, and seeing where it needs tweaking.
I got several weeks before the first version is even ready to test.
q |
|
|
Back to top
|
|
 |
3phase

Joined: Jul 27, 2004 Posts: 1189 Location: Berlin
Audio files: 13
G2 patch files: 141
|
Posted: Sat Dec 16, 2006 2:11 pm Post subject:
|
 |
|
ok..i wondered if anybody can be that fast... But you are very fast allready...very fast...
I will do some spectral oscilator research again... and post the result here..
You are wright that the Filterbank isnt often used...and actually in most cases its used to flatten the sound at the output a bit like a mastering plug.. so this could be overpatched with one of the G2´s Eq modules that can be altered by taste...
The Spectral oscillator is different. Because it was the bestsoundin oscillator in the NM1 its used pretty often. At least i came along many patches using it.. maybe 20%? i dont know..but it would be a pitty to leave that patches out.
Anyway.. it might be good if we can support your work by creating building blocks that replace certain NM1 unique funktions.
There was attempts like that in the past..
Rob did a formant oscilator for example... i tryed to do the spectral osc...
But this attempts was rather educational aproaches that dont tryed to do exact emulations that behave the same on all settings...
Can be a dsp space problem in some cases anyway... so a good dsp cheap compromise might be better suited than the perfect emulation...
or 2 versions where the software can choose between dsp cheap rough equation and propper emulation try.
Do you have a NM1? If not you might post reference conversions here and people that have booth machines by hand can check how they relate...
Anyway thumbs up for you attacking this problem. |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Sat Dec 16, 2006 5:25 pm Post subject:
Subject description: Success!!!! Success!!! |
 |
|
Wow!!! I got the first patch to convert!!! A couple tweaks, a couple of hacks and it worked. It was only the Basic1.pch from the Clavia tips and tricks page but the whole thing worked!!! Well at least the infrastructure is there. Now I just gotta right code for each module to convert. Here is python code of the ADSR-Env convertion class:
| Code: |
class ConvertADSR_Env(Convert):
def domodule(self):
nmm = self.nmmodule
g2m = self.g2module = self.g2area.addmodule(g2name['EnvADSR'])
g2m.horiz = nmm.horiz
g2m.vert = nmm.vert
g2m.uprate = 1 # up the processing rate, just fake it for now
# i will route a loop against the inputs to see if they originate
# from an audio or control source and then change this parameter
# appropriately.
# update parameters
# fix Attack, Decay, Release
g2m.params.Attack.variations = nmm.params.Attack.variations[:]
g2m.params.Decay.variations = nmm.params.Decay.variations[:]
g2m.params.Sustain.variations = nmm.params.Sustain.variations[:]
g2m.params.Release.variations = nmm.params.Release.variations[:]
# build output array that maps nm1 outputs
self.outputs.extend([g2m.outputs.Env,g2m.outputs.Out])
# build input array that nmps nm1 inputs
# vvvv No Retrig, No AM
self.inputs.extend([g2m.inputs.In,g2m.inputs.Gate,None, None])
|
It needs code to handle the Retrig, and AM, but that can be added later. The converter grabs each module, and allows you to build a sub-structure of one or more modules, then you create the input and output mapping of the NM1 module to the sub-structures modules. The code looks simple to me, how about to you?
Now, I have to write one of these for each NM1 module. I also have to handle module placement. I'm going to sort the modules by column and by row. Then determine the vertical separation between the current module and the one above it. The converted patch will maintain that vertical separation. I didn't think I was going to be this far along this fast. It just seemed to come together. The proof of concent is complete. Now cleanup, optmization, and updates.
q |
|
|
Back to top
|
|
 |
3phase

Joined: Jul 27, 2004 Posts: 1189 Location: Berlin
Audio files: 13
G2 patch files: 141
|
Posted: Sat Dec 16, 2006 5:44 pm Post subject:
|
 |
|
congrats..
So i wasn't much to early than thinking about the building block thing...
A retrigger solution can be found in the building blocks section.
the am of the envelopes equals to a vca module behind them..
one that is always open by factor one when not connected.
so emulation of the am input and retrig input is only necessary when they are used by the patch..
this applies aswell to other modules... again the spectral oscillator..
if you have patches that don't use FM its actually hacked already.
It just needs some vca´s and mixers to get the desired level boosts.
with fm i run into problems having the whole range of fm amount settings working.. i however managed it to emulate fixed values..or partial ranges..
so if this don't gets hacked in convenient ways there might be the possibility to have one building block for fm amount 0-40% and another one for fm amount settings above 40%.
Do you think its convinient or possible that the software looks automatical for the wright version of a buildingblock?
Or is it necessary to have one building block that represents the spectral osc absolute and complete? |
|
|
Back to top
|
|
 |
blue hell
Site Admin

Joined: Apr 03, 2004 Posts: 24493 Location: The Netherlands, Enschede
Audio files: 298
G2 patch files: 320
|
Posted: Sat Dec 16, 2006 5:52 pm Post subject:
|
 |
|
Was wondering about this uprate thingy. You do that to get the cable colors OK ? _________________ Jan
also .. could someone please turn down the thermostat a bit.
 |
|
|
Back to top
|
|
 |
qfingers
Joined: Nov 16, 2006 Posts: 186 Location: Tucson, AZ
G2 patch files: 2
|
Posted: Sat Dec 16, 2006 6:08 pm Post subject:
|
 |
|
| Blue Hell wrote: |
Was wondering about this uprate thingy. You do that to get the cable colors OK ? |
The uprate is what tells modules when to use audio rate processing instead of control rate. I used your (BlueHell) patch303.txt and s303.txt to create a module database for the NM1. I also used your (BlueHell) module_table.txt and param_table.txt files for the module database of the G2. That saved alot of time. There are minor corrections I had to make but was no big deal.
As far as the colors, I just mapped NM1 Audio, Control, Logic, etc. to G2 colors through a simple table. Eventually, I'll add code to handle cable colors properly. After I create many more of those class modules similar to the previous post.
By the way, that example code is all that is needed to convert a module now. The internals of the converter handle the rest. Most of the time is spent on looking at the database to get the proper parameters, inputs, and outputs setup. The envelope times are way off. I gotta write a conversion table. Those seem to be the most drastic change in parameters from the NM1. The Lfo and Oscillator frequencies are the same.
q |
|
|
Back to top
|
|
 |
|