Page 1 of 1

Posted: 09 Sep 2018, 17:24
by joffo78
Hi.
I'm trying to create a template which open a patch when i drag and drop an audio file.
I put my patch in the template folder and i create a txt file copying an existing one.
Here is my file :

Code: Select all

Tempo Player
wav mp3 flac aif aiff  // file name ext ('wav', 'usr', etc...)
0    // none=0,in=1,out=2
*    // term flowtype  
*      // term display flow type  dftText=0 dftgain=1 dftDir=2 dftSwitch=3 dftButton=4 dftInt=5 dftFloat=6, dftColor=7, dftListBox=8, dftArray=9, dftIpAddress=10, dftSmpte=11, dftFileName=12, dftMIDINote=13, dftHexa=14, dftTrigger=15, dftPassword=16  
*    // termainal name can be '*' or "any string"
0   // drag on wire 0=false 1=true
-1  // source module ID (-1 = any module)
 
SET_TARGET_PATCH SENDER_PATCH
PROMPT_FOR_SAVE
CLEAR_PATCH
LOAD_PATCH "Audio File Tempo Player.pat" 
SET_STRING_VALUE WGP1 "add file name" DROP_FILENAME
RENAME_MODULE WGP1
RENAME_PATCH DROP_SHORT_FILENAME
When i try, it works well opening my patch but no audiofile is loaded.

what error did i commit ?
Thanks.

Posted: 09 Sep 2018, 17:26
by joffo78
here
is the patch

Posted: 09 Sep 2018, 17:57
by 23fx23
not in front of usine currently, but couldn't be that once you loaded your subpatch, you should set this supath as sender patch, i guess the module you target isn't in top parent patch but in the new loded supatch. maybe open the white console by opening console and clic inside of it, then drop your file, it will tell you what the error is

Posted: 09 Sep 2018, 18:28
by joffo78
Hi 23fx23
You're always a killer !
here is a console message :

Code: Select all

----------------------------------
SET_VAR patch 35012060 = noname
SET_VAR integer MOUSE_X = 1001
SET_VAR integer MOUSE_Y = 63
SET_VAR integer CONTROL_PRESSED = 0
SET_VAR integer SHIFT_PRESSED = 0
SET_VAR integer ALT_PRESSED = 0
SET_VAR integer ON_WIRE = 0
SET_VAR integer SRC_TERM_IN_OUT = 0
SET_VAR String DROP_FILENAME = /Users/***/Desktop/Mri sounds  .wav
SET_VAR String DROP_FILEEXT = wav
SET_VAR integer SRC_MODULE_ID = -1
SET_VAR String DROP_SHORT_FILENAME = Mri sounds
I don't understand very well but it dosen't seem to detect any error

Posted: 09 Sep 2018, 21:17
by nay-seven
you must rename the sampler in your empty template patch, to suit the name in your text file ( open another template patch to see what i mean)
here rename the sampler "WGP1"

Posted: 09 Sep 2018, 21:45
by joffo78
Great it's work !
Thanks a lot !