Welcome to %s forums

BrainModular Users Forum

Login Register

create a template

I need help on a Patch
Post Reply
joffo78
Member
Posts: 1033
Contact:

Unread post by joffo78 » 09 Sep 2018, 17:24

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.


23fx23
Member
Posts: 2545
Contact:

Unread post by 23fx23 » 09 Sep 2018, 17:57

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

joffo78
Member
Posts: 1033
Contact:

Unread post by joffo78 » 09 Sep 2018, 18:28

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

User avatar
nay-seven
Site Admin
Posts: 5684
Location: rennes France
Contact:

Unread post by nay-seven » 09 Sep 2018, 21:17

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"

joffo78
Member
Posts: 1033
Contact:

Unread post by joffo78 » 09 Sep 2018, 21:45

Great it's work !
Thanks a lot !

Post Reply

Who is online

Users browsing this forum: No registered users and 34 guests