Where did you find this function? Never seen it.
This will open a dialog with 'Dialog title' title and set mp3 extension. When user chooses file, you get retval = true and filenameNeed4096 = [file_path]
Code:
retval, filenameNeed4096 = reaper.GetUserFileNameForRead('', 'Dialog title', 'mp3')
If then you want to insert such file into a project, you need to use this function, where mode is:
Quote:
mode: 0=add to current track, 1=add new track, 3=add to selected items as takes, &4=stretch/loop to fit time sel, &8=try to match tempo 1x, &16=try to match tempo 0.5x, &32=try to match tempo 2x, &64=don't preserve pitch when matching tempo, &128=no loop/section if startpct/endpct set, &256=force loop regardless of global preference for looping imported items, &512=use high word as absolute track index if mode&3==0 or mode&2048, &1024=insert into reasamplomatic on a new track (add 1 to insert on last selected track), &2048=insert into open reasamplomatic instance (add 512 to use high word as absolute track index), &4096=move to source preferred position (BWF start offset), &8192=reverse
|
Code:
reaper.InsertMedia( file, mode )
or this function, if you want to insert only a part of file:
Code:
reaper.InsertMediaSection( file, mode, startpct, endpct, pitchshift )