# This file contains info to generate wraplistfunc.c, radium_wrap.c, radium_s7_wrap.c, and radium_proc.h # It is also used by keybindingsconf.py to find default arguments. # Important, syntax must be: "char* funcname", not: "char*funcname" or "char*funcname". # # The 'Place' type is used to denote time position in the editor. # It can either be an integer (a line number), a rational (a/b), or a symbol with the value 'same-place (i.e. don't move this object). # In 3rd party scripts, 'Place' can also be a decimal number instead of a rational, but this is not allowed internally in Radium. #/******************************************* # Initialization #*******************************************/ init_radium | const_char* arg | PyObject* gkf #/******************************************* # Computer Keyboard Note Playing/Editing #*******************************************/ keyDownPlay | int notenum | int windownum ? -1 polyKeyDownPlay | int notenum | int windownum ? -1 keyUpPlay | int notenum | int windownum ? -1 setKeyAdd | int addnum incKeyAdd | int incaddnum decKeyAdd | int decaddnum bool switchDrunkVelocityOnOff # returns new value switchEditOnOff switchSoundScrollOnOff | int windownum ? -1 incNoteVolume | int incvolume | int windownum ? -1 bool doScrollPlay setScrollPlay | bool doit switchScrollPlayOnOff bool doAutoRepeat setAutoRepeat | bool doit bool doRangePasteCut setRangePasteCut | bool doit bool doRangePasteScrollDown setRangePasteScrollDown | bool doit bool doScrollEditLines setScrollEditLines | bool doit setNoteScrollLength | int length int getNoteScrollLength #/******************************************* # Navigating #*******************************************/ cursorDown | int numlines | int windownum ? -1 cursorUp | int numlines | int windownum ? -1 cursorNextNote | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorPrevNote | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorNextWaveform | int polyphony_num ? -1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorPrevWaveform | int polyphony_num ? -1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorNextVelocity | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorPrevVelocity | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorNextFx | int fxnum ? -1 |int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorPrevFx | int fxnum ? -1 |int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorNextSomething | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorPrevSomething | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # 'realline' is the actual graphical line you see on the screen. I.e. if LZ is 2, there are (normally) two reallines per line. int getCurrRealline | int blocknum ? -1 | int windownum ? -1 void setCurrRealline | int realline | int blocknum ? -1 | int windownum ? -1 # Note: Does nothing if blocknum is not current block. cursorUserInputLine requestCursorMove cursorPercentLine | int percent | int windownum ? -1 selectNextBlock | int windownum ? -1 selectPrevBlock | int windownum ? -1 selectNextPlaylistBlock selectPrevPlaylistBlock selectTrack | int tracknum | int windownum ? -1 # Tracknumbers for the leftmost tracks in a block (beware that these numbers are likely to change): # # BPM: -6 # LPB: -5 # Signature: -4 # Swing: -2 # Tempo automation: -1 # setCurrentTrack | int tracknum | int subtrack ? -2 | int windownum ? -1 | bool switch_instrument_even_if_locked ? true # subtrack==-2 means try to use same subtrack as for the current track. Also note that the notetext subtrack is always -1. The swing subtracks numbers are always 0,1,2 (even though swing is to the left of the note). int getCurrentTrack | int windownum ? -1 int getCurrentSubtrack | int windownum ? -1 int getNumSubtracks | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns the number of possible horizontal cursor positions. bool getTrackVisible | int tracknum | int blocknum ? -1 | int windownum ? -1 bool canCursorMoveToTrack | int tracknum | int subtrack ? -1 | int blocknum ? -1 | int windownum ? -1 int getLeftmostCursorTrack | int blocknum ? -1 | int windownum ? -1 # Currently returns BPM track (-6). Note that the BPM track doesn't have to be visible. # TODO. # subtracktype can be one of: swing, note, cent, velocity, chance, or "fx FXNAME" (e.g. "fx Sustain" or "fx Release"). # subtracktypenum is the subtracknum within the subtracktype, a number between 0 and 3. #int getSubtracknum const_char* subtracktype | int subtracktypenum | int tracknum | int blocknum ? -1 | int windownum ? -1 #const_char* getSubtrackType | int subtracknum ? -2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #int getSubtrackTypeNum | int subtracknum ? -2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cursorRight | int windownum ? -1 | bool switch_instrument_even_if_locked ? true cursorNextTrack | int windownum ? -1 | bool switch_instrument_even_if_locked ? true cursorLeft | int windownum ? -1 | bool switch_instrument_even_if_locked ? true cursorPrevTrack | int windownum ? -1 | bool switch_instrument_even_if_locked ? true int currentBlock | int windownum ? -1 int currentTrack | int blocknum ? -1 | int windownum ? -1 int currentLine | int blocknum ? -1 | int windownum ? -1 setCurrentLine | int linenum | int windownum ? -1 #/******************************************* # Track on/off #*******************************************/ allTracksOn bool trackOn | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void setTrackOn | bool is_on | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 switchTrackOn | int tracknum ? -1 | int windownum ? -1 soloTrack | int tracknum ? -1 | int windownum ? -1 switchSoloTrack | int tracknum ? -1 | int windownum ? -1 #/******************************************* # Zoom #*******************************************/ expandBlock | int blocknum ? -1 expandRange | int blocknum ? -1 | int windownum ? -1 lineZoomBlock | int numlines | int blocknum ? -1 | int windownum ? -1 # 'numlines' is lz in the format described in getLineZoomBlock. (TODO: don't use this format) int getLineZoomBlock | int blocknum ? -1 | int windownum ? -1 # if the return value < 0, then lz = 1/return value. (TODO: don't use this format) dyn_t getLineZoomBlockRatio | int blocknum ? -1 | int windownum ? -1 # Returns the actual lz value. expandLine | int numlines | int windownum ? -1 splitLine | int numlines | int windownum ? -1 unsplitLine | int windownum ? -1 zoom | int incfontsize | int windownum ? -1 # zooms editor, mixer, or sequencer, depending on which one has keyboard focus. resetEditorZoom | int windownum ? -1 resetMixerZoom resetSequencerZoom unzoom | int windownum ? -1 # calls resetEditorZoom, resetMixerZoom, or resetSequencerZoom, depending on which one has keyboard focus. #/******************************************* # Notes #*******************************************/ transposeTrack | int transpose | int windownum ? -1 transposeBlock | int transpose | int windownum ? -1 transposeRange | int transpose | int windownum ? -1 transposeNote | int transpose | int windownum ? -1 invertTrack | int windownum ? -1 invertBlock | int windownum ? -1 invertRange | int windownum ? -1 pexpandTrack | int f ? -1000 | int windownum ? -1 pexpandBlock | int f ? -1000 | int windownum ? -1 pexpandRange | int f ? -1000 | int windownum ? -1 backwardsTrack | int windownum ? -1 backwardsBlock | int windownum ? -1 backwardsSong backwardsRange | int windownum ? -1 generalTrackQuantitize | int windownum ? -1 quantitizeTrack | int windownum ? -1 quantitizeBlock | int windownum ? -1 quantitizeRange | int windownum ? -1 dyn_t getQuantitize | bool as_string ? false void setQuantitize | dyn_t ratio # ratio can be a number or string. (we may use strings since rational numbers don't preserve denominator values) int getQuantitizeType # see gui. 1 is the first option, 2 is the second, and so forth. void setQuantitizeType | int type configQuantitize | int windownum ? -1 Place getGrid glissando | int windownum ? -1 const_char* getNoteName2 | int notenum ? -1 const_char* getNoteName3 | int notenum ? -1 float getNoteNameValue | const_char* notename float getLowestKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getHighestKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getPianorollLowKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getPianorollHighKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void setPianorollRange | int minkey | int maxkey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setPianorollLowKey | int key | int tracknum | int blocknum ? -1 | int windownum ? -1 setPianorollHighKey | int key | int tracknum | int blocknum ? -1 | int windownum ? -1 setPianorollAutoRange | int tracknum | int blocknum ? -1 | int windownum ? -1 # automatically calls setPianorollLowKey and setPianorollHighKey int getNoteVolume | int windownum ? -1 | int blocknum ? -1 | int tracknum ? -1 | dyn_t note ? g_dyn_minus_one int getNumNotes | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addNote | float notevalue | float velocity | Place start | Place end | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addNote3 | float notevalue | float velocity | int start_line | int start_counter | int start_dividor | int end_line | int end_counter | int end_dividor | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 cutNote | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteNote | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool noteContinuesNextBlock | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setNoteContinueNextBlock | bool continuenextblock | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteAllNotesInTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteAllNotesAndStopsInTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteAllStopsInTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 undoNotes | int tracknum ? -1 | int blocknum ? -1 const_char* getNoteId | int notenum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # notenum -> noteid int getNoteNum | dyn_t noteid | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # noteid -> notenum (also works if "noteid" is a notenum) Place getNoteStart | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getNoteEnd | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getNoteValue | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getNoteEndPitch | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNoteSubtrack | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setNoMouseNote | int blocknum ? -1 | int windownum ? -1 setMouseNote | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void updateNotesInPlayer # Currently, Radium doesn't play new notes until it starts playing a block from the beginning. This function updates the player immediately. dynvec_t getAllNotes | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns a vector of noteids. void unselectAllNotes | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool noteIsSelected | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void selectNote | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void unselectNote | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 dynvec_t getSelectedNotes | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # sorted by start place bool hasSelectedNotes | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns true if at least one note is selected in the track. #/******************************************* # Velocities #*******************************************/ float getVelocityX | int num | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocityY | int num | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocityValue | int num | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getVelocityPlace | int num | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getVelocityLogtype | int num | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNumVelocities | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addVelocity | float value | Place place | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addVelocityDontDisplayErrors | float value | Place place | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # don't display error if place has the same value as another velocity (only return -1). int addVelocityF | float value | float floatplace | int notnum ? -1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 dyn_t setVelocity | float value | Place place | int velocitynum | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # place can be 'same-place. Returns note. dyn_t setVelocityF | float value | float floatplace | int velocitynum | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # place can be 'same-place. Returns note. deleteVelocity | int velocitynum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setVelocityLogtype | int logtype | int velocitynum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setCurrentVelocityNode | int velocitynum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setIndicatorVelocityNode | int velocitynum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #/******************************************* # Pitches #*******************************************/ float getPitchValue | int num | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getPitchPlace | int num | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getPitchLogtype | int num | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchChance | int num | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNumPitches | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addPitch | float value | Place place | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addPitchF | float value | float floatplace | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 dyn_t setPitch | float value | Place place | int pitchnum | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # place can be 'same-place. Returns notenum. dyn_t setPitchF | float value | float floatplace | int pitchnum | dyn_t note ? g_dyn_minus_one | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # place can be 'same-place. Returns notenum. deletePitch | int pitchnum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setPitchLogtype | int logtype | int pitchnum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #/******************************************* # Editor tempo #*******************************************/ setMainSignature | int numerator | int denominator setMainLPB | int lpb setMainBPM | int bpm Place getMainSignature int getMainLPB int getMainBPM int numSignatures | int blocknum ? -1 | int windownum ? -1 int addSignature | int numerator | int denominator | Place place | int blocknum ? -1 int addSignature3 | int numerator | int denominator | int line | int counter | int dividor | int blocknum ? -1 Place getSignature | int signaturenum | int blocknum ? -1 | int windownum ? -1 int numLPBs | int blocknum ? -1 | int windownum ? -1 int addLPB | int lpb | Place place | int blocknum ? -1 int addLPB3 | int lpb | int line | int counter | int dividor | int blocknum ? -1 int getLPB | int num | int blocknum ? -1 | int windownum ? -1 dyn_t getAllLPB | int blocknum ? -1 | int windownum ? -1 int numBPMs | int blocknum ? -1 | int windownum ? -1 void setBPMs | dynvec_t bpms | int blocknum ? -1 # bpms is a vector of hash tables where each table contains :place, :bpm, and :logtype. :logtype is optional. int addBPM | int bpm | Place place | int blocknum ? -1 int addBPM3 | int bpm | int line | int counter | int dividor | int blocknum ? -1 int getBPM | int num | int blocknum ? -1 | int windownum ? -1 Place getBPMPlace | int num | int blocknum ? -1 | int windownum ? -1 dyn_t getAllBPM | int blocknum ? -1 | int windownum ? -1 # same format as setBPMs. int getNumTemponodes | int blocknum ? -1 | int windownum ? -1 undoTemponodes setTemponode | int num | double value | Place place | int blocknum ? -1 | int windownum ? -1 deleteTemponode | int num | int blocknum ? -1 int addTemponode | float value | Place place | int blocknum ? -1 | int windownum ? -1 # Returns the node number, or -1 if a node was not created. dyn_t getAllTemponodes | int blocknum ? -1 | int windownum ? -1 dyn_t getAllBeats | int blocknum ? -1 | int windownum ? -1 dyn_t getAllBlockSwings | int blocknum ? -1 | int windownum ? -1 dyn_t getTrackSwings | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void setTrackSwings | dynvec_t swings | int tracknum ? -1 | int blocknum ? -1 #/******************************************* # Playing #*******************************************/ playBlockFromStart | int windownum ? -1 playBlockFromCurrent | int windownum ? -1 playSongFromStart playSongFromCurrent | int windownum ? -1 # i.e. play song from current editor position. playSongFromCurrentSequencerPosition playRangeFromStart | int windownum ? -1 playRangeFromCurrent | int windownum ? -1 setSongPos | int64_t pos # pos is in frames int64_t getSongPos # returns frames void incSongPos | double inc # inc is in seconds int64_t getLastSongPosStart # returns frames setLastSongPosStart | int64_t pos # pos is in frames playSongFromPos | int64_t pos # pos is in frames playStop volumeUp volumeDown mute bool isPlaying bool isPlayingBlock # returns false if not playing bool isPlayingSong # returns false if not playing double lineDuration | int line | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #/******************************************* # Clipboard #*******************************************/ # rangetype (clipboard type for range): # 0 = common range # 1 = bar single track # 2 = bar all tracks # 3 = beat single track # 4 = beat all tracks clearRange | int windownum ? -1 # Same as cutRange, except that range is not put into a clipboard. clearRange2 | Place p1 | Place p2 | int start_track | int end_track | int blocknum ? -1 | int windownum ? -1 # Same as cutRange2, except that range is not put into a clipboard. cutRange | int rangetype ? 0 | int windownum ? -1 # cuts the marked range into the 'rangetype' clipboard. cutRange2 | Place p1 | Place p2 | int start_track | int end_track | int rangetype ? 0 | int blocknum ? -1 | int windownum ? -1 copyRange | int rangetype ? 0 | int windownum ? -1 # # copies the marked range into the 'rangetype' clipboard. copyRange2 | Place p1 | Place p2 | int start_track | int end_track | int rangetype ? 0 | int blocknum ? -1 | int windownum ? -1 pasteRange | int rangetype ? 0 | int windownum ? -1 # Pastes to where the cursor is. Function is usually bound to the Left Extra + V. Automatically scrolls down cursor if configured to do so in preferences. pasteRange2 | Place startplace | int starttracknum | int rangetype ? 0 | int blocknum ? -1 | int windownum ? -1 # Note: Does not move cursor. markRange | int windownum ? -1 # Either create range, or extend current range. Uses cursor position. (see also setRange) cancelRange | int windownum ? -1 # I.e. no range will be marked cutTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 clearTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 copyTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 pasteTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 copyBlock | int windownum ? -1 pasteBlock | int windownum ? -1 cutGeneral copyGeneral pasteGeneral copySelectedMixerObjects deleteSelectedMixerObjects cutSelectedMixerObjects instrument_t pasteMixerObjects | float x ? -10000 | float y ? -10000 int getNumTracksInRange | int rangetype ? 0 Place getRangeLength | int rangetype ? 0 bool hasRangeInClipboard | int rangetype ? 0 # These functions works on the currently marked range, not the clipboard. The functions above works on the range copied into the clipboard. bool hasRange | int blocknum ? -1 | int windownum ? -1 int getRangeStartTrack | int blocknum ? -1 | int windownum ? -1 int getRangeEndTrack | int blocknum ? -1 | int windownum ? -1 Place getRangeStartPlace | int blocknum ? -1 | int windownum ? -1 Place getRangeEndPlace | int blocknum ? -1 | int windownum ? -1 void setRange | Place p1 | Place p2 | int start_track | int end_track | int blocknum ? -1 | int windownum ? -1 void saveBlock | filepath_t filename ? createIllegalFilepath() | int blocknum ? -1 | int windownum ? -1 void loadBlock | filepath_t filename ? createIllegalFilepath() # BETA! void saveTrack | filepath_t filename ? createIllegalFilepath() | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void loadTrack | filepath_t filename ? createIllegalFilepath() | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #/******************************************* # Undo #*******************************************/ setMaxUndos | int windownum ? -1 const_char* getUndoHistory redo undo resetUndo # For scheme: Use the "ignore-undo-block" macro instead of calling ra:start-ignoring-undo / ra:stop-ignoring-undo manually. startIgnoringUndo # careful. stopIgnoringUndo must be called later. I.e. stopIgnoringUndo must be put inside a finally clause. If not, undo may stop working. stopIgnoringUndo cancelLastUndo # undo adding an undo entry. Must only be called right after adding an undo (i.e. no user interaction). If not, anything could happen. addUndoBlock | int blocknum ? -1 addUndoTrack bool askAreYouSureSongHasChanged # For scheme: Use the "undo-block" macro instead of calling ra:open-undo / ra:close-undo manually. openUndo # careful. closeUndo must be called later. I.e. closeUndo must be put inside a finally clause. If not, undo may stop working. closeUndo addUndoRedoCallback | func_t* callback # Called right after the user undos or redos. If callback returns #f, the callback will be removed and not called again. removeUndoRedoCallback | func_t* callback addDirtyStatusChangeCallback | func_t* callback # Called when "dirty" status changes. A song is dirty if num undos since last save > 0, and clean if num undos since last save == 0. If callback returns #f, the callback will be removed and not called again. Example: ( :add-dirty-status-change-callback (lambda (is-dirty) (c-display "is-dirty:" is-dirty) #t)) removeDirtyStatusChangeCallback | func_t* callback #/******************************************* # Various #*******************************************/ editorWindowToFront | int windownum ? -1 playListWindowToFront instrumentWindowToFront setMixerRotate | float rotate bool mainMixerIsModular void setMainMixerIsModular | bool show_modular void switchMainMixerIsModular # same as ra.setMainMixerIsModular(not ra.mainMixerIsModular()) void setMainMixerInWindow | bool show_window bool mainMixerInWindow bool switchMainMixerInWindow # returns true if in window after calling. void setShowCpuUsageInMixer | bool showit bool getShowCpuUsageInMixer bool switchShowCpuUsageInMixer void setVisibleMixerConnections | bool val bool getVisibleMixerConnections bool switchVisibleMixerConnections void setVisibleMixerBusConnections | bool val bool getVisibleMixerBusConnections bool switchVisibleMixerBusConnections bool showInstrumentWidgetWhenDoubleClickingSoundObject void setShowInstrumentWidgetWhenDoubleClickingSoundObject | bool val bool showPlaylistDuringStartup void setShowPlaylistDuringStartup | bool val bool showMixerStripDuringStartup void setShowMixerStripDuringStartup | bool val bool instrumentInMixer void setInstrumentInMixer | bool val bool switchInstrumentInMixer bool sequencerInMixer void setSequencerInMixer | bool val bool switchSequencerInMixer bool sequencerInMainTabs void deletePdController | instrument_t instrument_id | const_char* effect_name bool instrumentAlwaysReceiveMidiInput | instrument_t instrument_id void setInstrumentAlwaysReceiveMidiInput | instrument_t instrument_id | bool always_receive_midi_input void switchSetInstrumentAlwaysReceiveMidiInput | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() bool getNoteDuplicatorSetNewValueImmediately | instrument_t instrument_id | const_char* effect_name void setNoteDuplicatorSetNewValueImmediately | instrument_t instrument_id | const_char* effect_name | bool set_immediately bool showMixerStripOnLeftSide void setShowMixerStripOnLeftSide | bool val bool sequencerWindowIsChildOfMainWindow void setSequencerWindowIsChildOfMainWindow | bool val bool mixerWindowIsChildOfMainWindow void setMixerWindowIsChildOfMainWindow | bool val bool helpWindowIsChildOfMainWindow void setHelpWindowIsChildOfMainWindow | bool val bool swapCtrlAndCmd # Note: Only works on Mac. void setSwapCtrlAndCmd | bool val # Note: Only works on Mac. toggleCurrWindowFullScreen toggleFullScreen | int windownum ? -1 bool editorIsVisible | int windownum ? -1 void showEditor void hideEditor showHideEditor | int windownum ? -1 void showHideFocusEditor # same as showHideEditor, but if editor is visible and doesn't have keyboard focus, editor will get keyboard focus instead of hidden. void showHidePresetBrowser void deletePresetBrowserInstrument void setEditorKeyboardFocus | bool setit ? true void setMixerKeyboardFocus | bool setit ? true void setSequencerKeyboardFocus | bool setit ? true setBestGuessKeyboardFocus bool editorHasKeyboardFocus bool mixerHasKeyboardFocus bool sequencerHasKeyboardFocus void showSequencer void hideSequencer bool sequencerIsVisible showHideSequencer void showHideFocusSequencer void configureSequencerWidget | bool in_window | bool in_main_tabs ? sequencerInMainTabs() setSequencerInWindow | bool doit bool sequencerInWindow showHideSequencerInWindow void setSequencerInFullMode | bool doit bool sequencerInFullMode bool switchSequencerInFullMode switchSequencerPlaylistConfiguration showHideMixerWidget bool mixerIsVisible void showHideFocusMixer showHideInstrumentWidget | int windownum ? -1 showHidePlaylist | int windownum ? -1 showHideMixerStrip | int windownum ? -1 showHideEditWidget void showEditGui void hideEditGui bool editGuiIsVisible void showEditQuantitizeTab void showEditTransposeTab void showEditRandomizeTab void showEditVariousTab # "upper part" is current instrument mixer strip, editor, playist/blocklist, and mixer void hideUpperPartOfMainWindow void showUpperPartOfMainWindow bool upperPartOfMainWindowIsVisible showHideUpperPartOfMainWindow int getMaxSubmenuEntries void setMaxSubmenuEntries | int val float getTabBarHeight void setTabBarHeight | float new_val showHideMenuBar | int windownum ? -1 hideMenuBar | int windownum ? -1 showMenuBar | int windownum ? -1 switchWindowConfiguration enableMetronome | bool onoff bool metronomeEnabled bool switchMetronome # returns new value bool playCursorEnabled enablePlayCursor | bool onoff switchPlayCursorOnOff bool editorFollowsPlayCursor enableEditorFollowsPlayCursor | bool onoff bool switchEditorFollowsPlayCursor bool allowAutomaticallyChangingCurrentBlock void setAllowAutomaticallyChangingCurrentBlock | bool allow bool switchAllowAutomaticallyChangingCurrentBlock bool autoselectEditorBlockUnderMouse void setAutoselectEditorBlockUnderMouse | bool val bool autoselectEditorBlockWhenChangingSeqtrack void setAutoselectEditorBlockWhenChangingSeqtrack | bool val bool autoselectSeqtrackUnderMouse void setAutoselectSeqtrackUnderMouse | bool val bool sequencerMouseScrollWheelStartsStopsPlaying void setSequencerMouseScrollWheelStartsStopsPlaying | bool val insertReallines | int toinsert | int windownum ? -1 void generalTransposeEntryDown | bool big_step ? false void generalTransposeEntryUp | bool big_step ? false void generalTransposeTrackDown | bool big_step ? false void generalTransposeTrackUp | bool big_step ? false void generalTransposeRangeDown | bool big_step ? false void generalTransposeRangeUp | bool big_step ? false void generalTransposeBlockDown | bool big_step ? false void generalTransposeBlockUp | bool big_step ? false generalDelete | bool scroll_down ? true | int windownum ? -1 # For the editor. simulateDeleteMouseButton # Same as pressing the delete mouse button or holding shift and press right mouse button. insertLines | int toinsert ? 0 | int windownum ? -1 # Note: toinsert is reallines, not lines. insertLines2 | Place start | Place how_much | int blocknum ? -1 deleteLines2 | Place start | Place end | int blocknum ? -1 generalReturn | int windownum ? -1 int appendBlock appendTrack | int blocknum ? -1 swapTracks | int windownum ? -1 makeTrackMonophonic | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 splitTrackIntoMonophonicTracks | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 splitBlock | int windownum ? -1 setNumTracks | int numtracks | int blocknum ? -1 | int windownum ? -1 setNumLines | int numlines | int blocknum ? -1 | int windownum ? -1 const_char* getTrackTypeName | int tracknum changeTrackNoteLength | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackNoteLength | int notelength | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getTrackNoteLength | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 changeBlockNoteLength | int windownum ? -1 changeTrackNoteAreaWidth | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool trackNoteAreaWidthIsWide | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void setTrackNoteAreaWidth | bool is_wide | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 changeBlockNoteAreaWidth | int windownum ? -1 minimizeTrack | int windownum ? -1 | int blocknum ? -1 | int tracknum ? -1 minimizeBlockTracks | int windownum ? -1 | int blocknum ? -1 | bool force ? true # if force is true, minimize as much as possible. If not, we only minimize approximately what seems reasonable. quit # | bool ignore_nsm ? true saveSoundfile openCommentDialog openSongPropertiesDialog openAudioDevicePreferencesDialog openPreferencesDialog openMIDIPreferencesDialog openSequencerPreferencesDialog openToolsDialog openPluginManager openMidiLearnPreferencesDialog openAboutWindow #const_char* getProgramPath #const_char* appendPaths | const_char* path1 | const_char* path2 bool hasConfPath | filepath_t filename filepath_t getConfPath | filepath_t filename filepath_t getKeybindingsConfPath filepath_t getMenuesConfPath filepath_t getEmbeddedAudioFilesPath setEmbeddedAudioFilesPath | filepath_t new_path bool save # | bool ignore_nsm ? false bool saveAs | filepath_t filename ? createIllegalFilepath() | bool with_embedded_samples ? false | bool ignore_nsm ? false bool exportSong | filepath_t filename ? createIllegalFilepath() # same as saveWithoutEmbeddedSamples, but doesn't change name of current song. bool saveWithEmbeddedSamples | bool ignore_nsm ? false # same as saveAs(createIllegalFilepath(), true) bool saveWithoutEmbeddedSamples | bool ignore_nsm ? false # same as saveAs(createIllegalFilepath(), false) bool saveAsOrExportSong | filepath_t filename ? createIllegalFilepath() # calls exportSong if using NSM, othervice saveAs bool load | bool ignore_nsm ? false # same as loadSong, but automatically opens filerequester first bool loadSong | filepath_t filename ? createIllegalFilepath() bool importSong | filepath_t filename ? createIllegalFilepath() # same as loadSong, but doesn't change filename. bool loadOrImportSong | filepath_t filename ? createIllegalFilepath() # calls importSong if using NSM, othervice loadSong newSong | bool ignore_nsm ? false void clearSong # same as newSong, but doesn't change filename. void newOrClearSong # calls clearSong if using NSM, othervice newSong bool hasSession internal_updateAllBlockGraphics # internal. Call after changing several blocks simultaneously to avoid small delays when changing blocks later. importMidi requestImportMod # async importXM insertTracks | int numtracks | int windownum ? -1 insertTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteTracks | int numtracks | int windownum ? -1 deleteTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteBlock | int blocknum ? -1 | int windownum ? -1 int insertBlock | int windownum ? -1 int getNumTracks | int blocknum ? -1 int getNumLines | int blocknum ? -1 int getNumReallines | int blocknum ? -1 | int windownum ? -1 int getNumBlocks const_char* getBlockName | int blocknum ? -1 void setBlockName | const_char* name | int blocknum ? -1 selectBlock | int blocknum | int windownum ? -1 | bool only_select_if_allowed_to_automatically_change ? false # Note, starts playing block if playing song when this function is called. setBlockColor | const_char* color | int blocknum ? -1 | int windownum ? -1 const_char* getBlockColor | int blocknum ? -1 | int windownum ? -1 | bool displayed_color ? true const_char* getAudiofileColor | filepath_t w_audiofilename | bool displayed_color ? true void setAudiofileColor | const_char* colorname | filepath_t w_audiofilename showBlocklistGui showInstrumentListGui setTrackNoteShowType | int type | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackVolume | float volume | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackPan | float pan | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 switchTrackNoteShowType | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setBlockNoteShowType | int type | int blocknum ? -1 | int windownum ? -1 switchBlockNoteShowType | int blocknum ? -1 | int windownum ? -1 int getTrackMidiChannel | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackMidiChannel | int midi_channel | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # swingtext, subtrack showSwingtext | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool swingtextVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideSwingtext | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideSwingtextInBlock | int blocknum ? -1 | int windownum ? -1 # hides all swing tracks in block, also subtracks. setSwingEnabled | bool val | int blocknum ? -1 | int windownum ? -1 bool getSwingEnabled | int blocknum ? -1 | int windownum ? -1 bool switchSwingEnabled | int blocknum ? -1 | int windownum ? -1 # returns new value bool centtextCanBeTurnedOff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showCenttext | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool centtextVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideCenttext | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideCenttextInBlock | int blocknum ? -1 | int windownum ? -1 showChancetext | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool chancetextVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideChancetext | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideChancetextInBlock | int blocknum ? -1 | int windownum ? -1 showVeltext | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool veltextVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideVeltext | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideVeltextInBlock | int blocknum ? -1 | int windownum ? -1 showFxtext | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool fxtextVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideFxtext | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideFxtextInBlock | int blocknum ? -1 | int windownum ? -1 showPianoroll | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool pianorollVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHidePianoroll | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHidePianorollInBlock | int blocknum ? -1 | int windownum ? -1 showNoteTrack | bool showit | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool noteTrackVisible | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideNoteTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 showHideNoteTracksInBlock | int blocknum ? -1 | int windownum ? -1 showHideSwingTrack | int windownum ? -1 #swingtext, global void setSwingTrackVisible | bool setit | int windownum ? -1 bool swingTrackVisible | int windownum ? -1 showHideSignatureTrack | int windownum ? -1 bool signatureTrackVisible | int windownum ? -1 void setSignatureTrackVisible | bool showit | int windownum ? -1 bool lpbTrackVisible | int windownum ? -1 void setLpbTrackVisible | bool showit | int windownum ? -1 void showHideLPBTrack | int windownum ? -1 void setBpmTrackVisible | bool setit | int windownum ? -1 showHideBPMTrack | int windownum ? -1 bool bpmTrackVisible | int windownum ? -1 showHideReltempoTrack | int windownum ? -1 bool reltempoTrackVisible | int windownum ? -1 void setReltempoTrackVisible | bool setit | int windownum ? -1 bool linenumbersVisible setLinenumbersVisible | bool doit showHideLinenumbers bool smoothSequencerScrollingEnabled void setSmoothSequencerScrollingEnabled | bool doit bool autoscrollSequencerToMakePlaycursorVisible void setAutoscrollSequencerToMakePlaycursorVisible | bool doit bool isUsingJack bool isUsingJackTransport # Same as isUsingJack() && useJackTransport() bool useJackTransport # Returns true if program is configured to use jack transport if jack is running. void setUseJackTransport | bool doit bool isJackTimebaseMaster void setIsJackTimebaseMaster | bool doit double getDefaultAudiofileFadeout void setDefaultAudiofileFadeout | double default_audiofile_fadeout bool doAutoCrossfades setDoAutoCrossfades | bool default_do_auto_crossfades bool useCPUFriendlyAudiometerUpdates void setUseCPUFriendlyAudiometerUpdates | bool val bool controlPortOpenForRemoteConnections void setControlPortOpenForRemoteConnections | bool val bool recordAccuratelyFromMidi void setRecordAccuratelyFromMidi | bool accurately bool switchRecordAccuratelyFromMidi bool doStopPlayingWhenSavingSong setStopPlayingWhenSavingSong | bool doit bool doSaveBackupWhilePlaying setSaveBackupWhilePlaying | bool val bool saveRecordedAudioFilesInBrowserPath void setSaveRecordedAudioFilesInBrowserPath | bool val bool doAutoBackups setDoAutoBackups | bool doit int autobackupIntervalInMinutes setAutobackupIntervalInMinutes | int interval bool doAutoDeleteSequencerRecordings void setDoAutoDeleteSequencerRecordings | bool doit int unusedRecordingTakesTreatment void setUnusedRecordingTakesTreatment | int treatment # These functions are used to create the main menus. This is done in bin/menus.py. addMenuMenu | const_char* name | const_char* command addMenuMenu2 | const_char* name | dynvec_t menu_entry_texts | func_t* callback goPreviousMenuLevel addMenuItem | const_char* name | const_char* command addCheckableMenuItem | const_char* name | const_char* command | int checkval ? 0 addMenuSeparator int64_t setStatusbarText | const_char* text # returns id. removeStatusbarText | int64_t id # The function does nothing if 'id' is not the currently showing status bar text. eraseEstimatedVblank int getWebserverPort dyn_t evalSchemeWithReturn | const_char* code evalScheme | const_char* code bool errorCheckEvalScheme # always returns true if radium is compiled in debug-mode void setErrorCheckEvalScheme | bool error_check # Set to true to run all code for evalScheme and evalSchemeWithReturn through "mylint" before evaluating. (dummy-operation if radium is compiled in debug-mode) evalPython | const_char* code void addKeybinding | const_char* command | const_char* keys # keys must be sorted dyn_t getKeybindingsFromCommands # returns a hash table that looks like this: {"D ALT_R" : "a.transposeNote(-1)", ...} dynvec_t getKeybindingsFromCommand | const_char* command # returns a vector with all keybindings assigned to this command dyn_t getKeybindingsFromKeys # returns a hash table that looks like this: {"a.transposeNote(-1)": "D ALT_R", ...} const_char* getKeybindingFromKeys | const_char* keys const_char* getQualifierName | const_char* qualifier # returns "" if qualifier is not recognized. reloadKeybindings addKeybindingToConfFile | const_char* keybinding | const_char* funcname | dynvec_t arguments # also calls reloadKeybindings removeKeybindingFromConfFile | const_char* keybinding | const_char* funcname | dynvec_t arguments # also calls reloadKeybindings void grabKeybinding | func_t* callback void cancelGrabKeybinding sendKeyEvent | const_char* keybinding # Should only be used for debugging, or testing something which is not possible without extending radium itself. 'keybinding' is a space-separated list of strings holding the key name first followed by qualifier names. Example "Q CTRL_L MOUSE_EDITOR FOCUS_EDITOR" See also gui_postKeyEvent. bool isFullVersion int radiumMajorVersion int radiumMinorVersion int radiumRevisionVersion bool vstGuiIsAlwaysOnTop setVstGuiAlwaysOnTop | bool doit bool showVirtualMidiKeyboardBelowNativeGUIs void setShowVirtualMidiKeyboardBelowNativeGUIs | bool doit bool doModalWindows setModalWindows | bool doit bool doHighCpuOpenGlProtection void setHighCpuOpenGlProtection | bool doit bool doLockJuceWhenSwappingOpenGL void setLockJuceWhenSwappingOpenGL | bool doit bool useNativeFileRequesters setUseNativeFileRequesters | bool doit float getInstrumentBrightness void setInstrumentBrightness | float val float getInstrumentBrightnessInEditor void setInstrumentBrightnessInEditor | float val float getInstrumentSaturation void setInstrumentSaturation | float val float getInstrumentSaturationInEditor void setInstrumentSaturationInEditor | float val float getBlockBrightness void setBlockBrightness | float val float getBlockSaturation void setBlockSaturation | float val float getAmountOfGradient void setAmountOfGradient | float val printMixerTree testCrashreporter testCrashreporterInAudioThread testErrorMessage startAutotestingMode # Used when running the api_autotesting.scm script. Turns off user interaction. stopAutotestingMode # Used when running the api_autotesting.scm script. Turns on user interaction. bool isInAutotestingMode int64_t getGcMemoryUsage # returns the number of bytes used by bdw-gc (calls GC_get_heap_size()) # Note: Use the "with-history-disabled" macro instead of using these two functions directly. void disableSchemeHistory void enableSchemeHistory # There is no playlist anymore. #setPlaylistLength | int len #setPlaylistBlock | int pos | int blocknum int getFaustOptimizationLevel setFaustOptimizationLevel | int level const_char* getFaustGuiStyle setFaustGuiStyle | const_char* style int64_t getBlockLength | int blocknum ? -1 | int windownum ? -1 # returns in frames. Note that block tempo multiplication is not applied. double getSongLength # returns seconds. Note that song tempo automation is ignored. int64_t getSongLengthInFrames # Note: Return value may not be 100% frame accurate. (that's quite complicated to achieve with the block multiplier) int getSampleRate dyn_t getCpuUsage # returns an array with three values [min, avg, max] since last call to this function. Used by the bottom bar widgets. int getNumXruns int64_t getEditorBlocksGeneration # This number increases every time a block is added or removed, tracks are added or removed, block is renamed, or block duration changes. int getLogtypeHold int getLogtypeLinear Place getCursorPlace | int blocknum ? -1 | int windownum ? -1 int getCursorTrack | int windownum ? -1 int getHighestLegalPlaceDenominator int getNumeratorFromRatioString | const_char* s # Can't always use getRatioFromString since scheme simplifies the ratio to lowest possible denominator int getDenominatorFromRatioString | const_char* s # Can't always use getRatioFromString since scheme simplifies the ratio to lowest possible denominator dyn_t getRatioFromString | const_char* s # For completenes in conjunction with quantitize and gui_ratio. Untested, probably works. const_char* getStringFromRatio | dyn_t ratio # For completenes in conjunction with quantitize and gui_ratio. Untested, probably works. const_char* toBase64 | const_char* s const_char* fromBase64 | const_char* w const_char* appendBase64Strings | const_char* w1 | const_char* w2 bool base64StringIs8bitCompatible | const_char* w # Returns true if the string can be displayed properly when represented as const_char*. On Linux and Macos this function should always return true (since these two platforms use utf-8), while on Windows, it returns true if the string only contains ascii characters. int getStringLength | const_char* s # s7 string length returns number of bytes, not the number of displayed characters. const_char* createUuid void msleep | int ms double getMs # Returns number of milliseconds since program started. int64_t getPid const_char* getArgv0 # Returns the argv[0] argument sent to main(). bool releaseMode bool optimizedBuild # Returns true if Radium was built with -O1 or any other -Ox optimization flag. const_char* getOsName # Returns "linux", "windows", or "macosx". const_char* getArchitectureName # Returns "i686", "x64", or "aarch64". const_char* getProgramLog void addToProgramLog | const_char* text void copyWtextToClipboard | const_char* wtext const_char* getClipboardWtext void copyTextToClipboard | const_char* text const_char* getClipboardText void copyFilepathToClipboard | filepath_t filepath filepath_t getClipboardFilepath # 'ms' can be any number, but the resolution of this timer is only 5ms. # 5ms MINIMIUM, that is, there are no realtime guarantees here since it runs in the main thread. # If ms==0, callback is not called immediately. However, qApp::exec() might not have had time to run in the mean time. (same goes for any number actually, but especially 0) void schedule | double ms | func_t* callback removeSchedule | func_t* callback dynvec_t stringSplit | const_char* string | const_char* split | bool keep_empty_parts ? true # s7 doesn't have this function builtin. #/******************************************* # OSC #*******************************************/ # # Protocol: # 0: DEFAULT, (liblo) # 1: UDP # 2: UNIX # 3: TCP # # "typespec" is a string denoting the types of the arguments. # i: integer # f: float # s: string # # sendOscMessage example: ( :send-osc-message "osc.udp://127.0.0.1:8000" "gakk/gakk2" "iii" (list 23 2 4)) # # Arguments sent to the method callbacks: url . args # # Method callbacks must return 'grab, 'pass, 'grab-and-close, or 'pass-and-close: # 'grab: The message will NOT be sent to other callbacks that might fit. # 'pass: The message WILL be sent to other callbacks that might fit. # 'grab-and-close: Similar to 'grab, but in addition, the callback will not be called again. # 'pass-and-close: Similar to 'pass, but in addition, the callback will not be called again. # # addOscMethod example: # ( :add-osc-method osc-server "gakk" "iii" (lambda (url i1 i2 i3) # (c-display url i1 i2 i3) # 'grab)) int64_t createOscServer | const_char* port ? "" | int protocol ? 0 # Returns server_id. If 'port' is empty string, port is autogenerated. Calls lo_server_new_with_proto(). void closeOscServer | int64_t server_id int getOscProtocolFromUrl | const_char* url int64_t addOscMethod | int64_t server_id | const_char* path | const_char* typespec | func_t* callback # returns method_id void closeOscMethod | int64_t method_id void sendOscMessage | const_char* url | const_char* path | const_char* typespec | dynvec_t args # (calls 'lo_send'). void sendOscMessageFrom | const_char* url | int64_t server_id | const_char* path | const_char* typespec | dynvec_t args # send from a server (calls 'lo_send_from'). # NSM (http://non.tuxfamily.org/nsm) bool nsmHasInited # Always true after program startup void waitUntilNsmHasInited # Not necessary to call after program startup bool nsmIsActive # is false if NSM is not used, or NSM initialization failed. const_char* getNsmClientId # Returns "" if NSM is not active. bool supportsSwitchNsmCapability void setSupportsSwitchNsmCapability | bool do_switch # restart required. :switch: is supported by default, but needs to be turned off if you want to run more than one Radium instance at once. void nsmNewSong void nsmSave void nsmDuplicate bool nsmOpen void nsmQuit #/******************************************* # MIDI input/output #*******************************************/ # # sendMidiMessage must be called from the main thread (same as all other API functions), so hard realtime performance can not be expected. # void sendMidiMessage | int64_t port | int byte1 | int byte2 ? -1 | int byte3 ? -1 void sendMidiSysex | int64_t port_id | dynvec_t bytes # 'bytes' must start with 0xf0 and and with 0xf7. #void setMidiPreset | int64_t output_port | int preset #void setMidiMSB | int64_t output_port | int MSB #void setMidiLSB | int64_t output_port | int LSB int64_t openMidiOutputPort | const_char* portname | bool create_new_port_if_not_existing ? true # returns -1 on error void closeMidiOutputPort | int64_t portnum # MIDI callback looks like this: # # (lambda (bytes) # ...) # # where 'bytes' is a vector of integers. # # if the callback returns #f the callback is closed and not called again. Also note that closeMidiCallback can not be called after the callback returns #f. # # The callback is called on the main thread, so hard realtime performance can (definitely) not be expected. # int64_t openMidiInputPort | const_char* portname | func_t* callback | bool create_new_port_if_not_existing ? true # returns -1 on error void closeMidiInputPort | int64_t portnum | bool throw_error_if_already_closed ? true void closeAllMidiInputPorts dynvec_t getMidiOutputPortNames # returns an array of strings. dynvec_t getMidiInputPortNames # returns an array of strings. #/******************************************* # File operations #*******************************************/ filepath_t createIllegalFilepath bool isIllegalFilepath | filepath_t filepath bool isLegalFilepath | filepath_t filepath const_char* getBase64FromFilepath | filepath_t filepath filepath_t getFilepathFromBase64 | const_char* base64text filepath_t getPath | const_char* path_string # careful, path_string should not contain non-ascii strings (even if the string is utf8). non-ascii strings probably won't work on windows. filepath_t getHomePath filepath_t getProgramPath const_char* getPathString | filepath_t filepath # warning, this might not always be true: getPath(getPathString(path))==path filepath_t appendFilePaths | filepath_t path1 | filepath_t path2 filepath_t getParentPath | filepath_t path filepath_t getDirPath | filepath_t path # e.g /tmp/hepp/gakkgakk.txt -> /tmp/hepp filepath_t getPathWithoutDir | filepath_t path # e.g /tmp/hepp/gakkgakk.txt -> gakkgakk.txt bool fileExists | filepath_t filepath dyn_t getFileInfo | filepath_t path # returns a hash table with :path, :filename, :is-dir, :is-sym-link, :exists, :last-modified, :is-hidden, :size, :suffix, and :is-audiofile. If :is-audiofile is #t, the entry will also contain :num-ch, :num-frames, :samplerate, and :format. ":format" is a short string. bool dirExists | filepath_t path bool createDir | filepath_t path # returns #f if directory couldn't be opened. (an error message is displayed by the function if that happens) # if async is #t, the function returns immediately. If async is #f, the function won't return until we are finished iterating. # # Note that the directory is iterated in a separate thread if async is #t, so async is better for interactivity than non-async. # (The callback is always called from the main thread though.) # # callback is a function with the following proto: # # bool callback | bool is_finished | dyn_t file_info # # If is_finished is #t, file_info is undefined. So the callback will at least be called one time, even if there are no entries. The callback must return #t or #f. If the callback returns #f (or throws an exception), we stop iterating. bool iterateDirectory | filepath_t path | bool async | func_t* callback file_t createIllegalFile bool isIllegalFile | file_t file # read/write text files file_t openFileForReading | filepath_t path # note: call to closeFile should be protected by try-finally file_t openFileForWriting | filepath_t path # note: call to closeFile should be protected by try-finally bool closeFile | file_t file bool writeToFile | file_t file | const_char* string # returns false if writing failed. bool fileAtEnd | file_t disknum const_char* readLineFromFile | file_t file # read binary file_t openFileForBinaryReading | filepath_t path # note: call to closeFile should be protected by try-finally int readLe32FromFile | file_t disknum int64_t readLeU32FromFile | file_t disknum #int readBe32FromFile | file_t disknum int64_t readBeU32FromFile | file_t disknum int readLe16FromFile | file_t disknum # int readLeU16FromFile(file_t disknum) #int readBe16FromFile(file_t disknum) int readBeU16FromFile | file_t disknum int read8FromFile | file_t disknum int readU8FromFile | file_t disknum # settings # # 'key' should not contain non-ascii characters. # 'key' can not contain '='. ('=' is used as delimiter in the configuration file) # Neither 'key' nor 'value' can start or end with spaces. void putSettings | const_char* key | const_char* value void putSettingsW | const_char* key | const_char* w_value # use for disk paths void putSettingsF | const_char* key | filepath_t w_value # use for disk paths const_char* getSettings | const_char* key | const_char* default_value const_char* getSettingsW | const_char* key | const_char* default_w_value # use for disk paths filepath_t getSettingsF | const_char* key | filepath_t default_w_value # use for disk paths dyn_t getAllSettings | const_char* starting_with_string ? "" # returns a const_char* -> const_char* hash table. Note that disk paths values in the returned value should not be used directly, but instead manually picked out again by using getSettingsF or getSettingsW. If 'starting_with_string' is not empty, only keys starting with 'starting_with_string' are returned. #/******************************************* # Instruments #*******************************************/ bool doAudioBuzyLoop void setAudioBuzyLoop | bool doit bool autobypassEnabled void setAutobypassEnabled | bool doit int getAutoBypassDelay void setAutobypassDelay | int ms bool latencyCompensationEnabled void setLatencyCompensationEnabled | bool doit bool getRecordingLatencyFromSystemInputIsAutomaticallyDetermined void setRecordingLatencyFromSystemInputIsAutomaticallyDetermined | bool new_value double getCustomRecordingLatencyFromSystemInput void setCustomRecordingLatencyFromSystemInput | double ms # MIDI instrument latency types: # 0: disabled # 1: system out input-latency # 2: system out input-latency + soundcard output-latency # 3: system out input-latency + custom latency int getMidiInstrumentLatencyType void setMidiInstrumentLatencyType | int type double getCustomMidiInstrumentLatency void setCustomMidiInstrumentLatency | double ms bool getCheckAbnormalSignals void setCheckAbnormalSignals | bool new_val bool doUndoSolo void setUndoSolo | bool doit bool doUndoBypass void setUndoBypass | bool doit void selectInstrumentForTrack | int tracknum ? -1 # shows popup. void requestReplaceInstrument | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() | const_char* instrument_description ? "" | int64_t parentgui ? -2 # Async. Returns immediately. Shows popup if instrument_description is empty string void requestLoadInstrumentPreset | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() | const_char* instrument_description ? "" | int64_t parentgui ? -2 # Async. Returns immediately. shows file requester if instrument_description is empty string void saveInstrumentPreset | dynvec_t instrument_ids ? g_empty_dynvec | int64_t parentgui ? -2 filepath_t getInstrumentPresetPath | instrument_t instrument_id ? createIllegalInstrument() # Always returns a valid path. If a preset was loaded for this instrument, it returns that preset. If not, it will return last used preset path, or the default preset path. filepath_t getInstrumentPreset | instrument_t instrument_id # Returns createIllegalFilepath() if instrument was not created from preset file. void replaceUseOfInstrument | instrument_t old_instrument_id | instrument_t new_instrument_id void setInstrumentForTrack | instrument_t instrument_id | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 instrument_t getInstrumentForTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # Returns -2 if track has no instrument assigned. Returns -1 for other errors. (both are illegal instruments) bool hasInstrumentForTrack | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool isLegalInstrument | instrument_t instrument_id instrument_t createIllegalInstrument void setInstrumentName | const_char* name | instrument_t instrument_id const_char* getInstrumentName | instrument_t instrument_id const_char* getInstrumentComment | instrument_t instrument_id void setInstrumentComment | const_char* comment | instrument_t instrument_id bool instrumentNameWasAutogenerated | instrument_t instrument_id bool hasPureData bool instrumentSupportsChangingPitchOfPlayingNote | instrument_t instrument_id ? createIllegalInstrument() | bool include_event_connected_instruments ? false bool instrumentDoesNotSupportChangingPitchOfPlayingNote | instrument_t instrument_id ? createIllegalInstrument() | bool include_event_connected_instruments ? false bool hasNativeInstrumentGui | instrument_t instrument_id bool showInstrumentGui | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() | int64_t parentgui ? -2 | bool show_instrument_window_if_not_visible ? false # Returns true if opening a native GUI. bool hideInstrumentGui | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() bool instrumentGuiIsVisible | instrument_t instrument_id | int64_t parentgui void internal_instrumentGuiHasBeenHidden | instrument_t instrument_id bool showHideInstrumentGui | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() | int64_t parentgui ? -2 | bool show_instrument_window_if_not_visible ? false void selectInstrumentConfigNum | int confignum | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() void resetInstrumentConfigNum | int confignum ? -1 | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() # confignum==-1 means reset all. int getCurrInstrumentConfigNum | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() # confignum==-1 means reset all. bool instrumentConfigNumIsUsed | int confignum | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() instrument_t getCurrentInstrumentUnderMouse # Actual behavior: current mixer instrument, which is usually the same as the last pointed-to mixer object. Always returns an audio instrument. void setCurrentInstrumentUnderMouse | instrument_t instrument bool mousePointerCurrentlyPointsAtInstrument instrument_t getCurrentInstrument # Always returns a valid instrument. void setCurrentInstrument | instrument_t instrument_id | bool show_instrument_window_if_not_visible ? false | bool only_change_if_unlocked ? false void setCurrentInstrumentLeft | bool set_current_instrument ? false | bool set_current_instrument_under_mouse ? true void setCurrentInstrumentRight | bool set_current_instrument ? false | bool set_current_instrument_under_mouse ? true void setCurrentInstrumentUp | bool set_current_instrument ? false | bool set_current_instrument_under_mouse ? true void setCurrentInstrumentDown | bool set_current_instrument ? false | bool set_current_instrument_under_mouse ? true #void setCurrentInstrumentLocked | bool lockit # if lockit is true, the program will not (by itself) change current instrument to a different instrument. #bool isCurrentInstrumentLocked #switchSetCurrentInstrumentLocked void addCurrentInstrumentChangedCallback | func_t* callback # If callback returns #f, the callback will not be called again. void removeCurrentInstrumentChangedCallback | func_t* callback void addCurrentInstrumentUnderMouseChangedCallback | func_t* callback # If callback returns #f, the callback will not be called again. void removeCurrentInstrumentUnderMouseChangedCallback | func_t* callback showInstrumentInfo | dyn_t instrument_id_or_description ? g_uninitialized_dyn | int64_t parentgui ? -2 int64_t getInstrumentDeletionGeneration int64_t getAudioInstrumentDeletionGeneration # audio instrument_t createAudioInstrument | const_char* type_name | const_char* plugin_name | const_char* name ? "" | float x ? 0 | float y ? 0 | bool set_as_current ? true | bool is_visible ? true # returns instrument_id instrument_t createAudioInstrumentFromPreset | filepath_t filename | const_char* name ? "" | float x ? 0 | float y ? 0 | bool set_as_current ? true | bool is_visible ? true const_char* getAudioInstrumentDescription | const_char* container_name | const_char* type_name | const_char* plugin_name # container_name is usually "" (for vst containers). All arguments must be in base64 format. instrument_t createAudioInstrumentFromDescription | const_char* instrument_description | const_char* name ? "" | float x ? 0 | float y ? 0 | bool set_as_current ? true | bool is_visible ? true # returns instrument_id instrument_t cloneAudioInstrument | instrument_t instrument_id | float x ? 0 | float y ? 0 | bool set_as_current ? true dyn_t createNewInstrumentConf | float x ? 0 | float y ? 0 | bool connect_to_main_pipe ? false | bool do_autoconnect ? false | bool include_load_preset ? true | bool must_have_inputs ? false | bool must_have_outputs ? false | int64_t parentgui ? -2 void createInstrumentDescriptionPopupMenu | dyn_t instrument_conf # Returns vectors of filepaths. dynvec_t getAllSinglePresetsInPath | filepath_t path ? createIllegalFilepath() dynvec_t getAllMultiPresetsInPath | filepath_t path ? createIllegalFilepath() requestLoadPresetInstrumentDescription | int64_t parentgui | func_t* callback bool instrumentPresetInClipboard setInstrumentSample | instrument_t instrument_id | filepath_t filename setRandomInstrumentSample | instrument_t instrument_id | filepath_t path ? createIllegalFilepath() # if path is illegal, current path will be used. setRandomSampleForAllSelectedInstruments # Note: Operates on getExtendedSelectedInstruments. setInstrumentLoopData | instrument_t instrument_id | int64_t start | int64_t length bool keepOldLoopWhenLoadingNewSample void setKeepOldLoopWhenLoadingNewSample | bool new_val bool useSameLoopFramesWhenLoadingNewSample # if false, use same percentage position for the loop points. void setUseSameLoopFramesWhenLoadingNewSample | bool new_val void setInstrumentColor | const_char* colorname | instrument_t instrument_id ? createIllegalInstrument() void generateNewInstrumentColor | instrument_t instrument_id ? createIllegalInstrument() | float mix_background ? 0.9 # mix_background must be between 0 and 1. void generateNewColorForAllSelectedInstruments | float mix_background ? 0.9 # mix_background must be between 0 and 1. Note: Operates on getExtendedSelectedInstruments. const_char* getInstrumentColor | instrument_t instrument_id | bool get_displayed_color ? true const_char* getInstrumentTypeName | instrument_t instrument_id const_char* getInstrumentPluginName | instrument_t instrument_id # instrument programs (e.g. vst programs) int getNumInstrumentPrograms | instrument_t instrument_id int getCurrInstrumentProgram | instrument_t instrument_id void setCurrInstrumentProgram | instrument_t instrument_id | int program void setInstrumentProgramName | instrument_t instrument_id | int program | const_char* new_name const_char* getInstrumentProgramName | instrument_t instrument_id | int program bool instrumentHasBeenUsed | instrument_t instrument_id # effects const_char* getInstrumentEffectName | int effect_num | instrument_t instrument_id int getNumInstrumentEffects | instrument_t instrument_id void resetInstrumentEffect | instrument_t instrument_id | const_char* effect_name bool instrumentEffectExists | instrument_t instrument | const_char* effect_name float getInstrumentEffect | instrument_t instrument_id | const_char* effect_name # Returns current value. Value between 0 and 1. float getNativeInstrumentEffect | instrument_t instrument_id | const_char* effect_name # Returns current value. Native format. float getStoredInstrumentEffect | instrument_t instrument_id | const_char* effect_name # Returns last set value (not automation). Value between 0 and 1. float getStoredNativeInstrumentEffect | instrument_t instrument_id | const_char* effect_name # Returns last set value (not automation). Native format. float getDefaultInstrumentEffect | instrument_t instrument_id | const_char* effect_name setInstrumentEffect | instrument_t instrument_id | const_char* effect_name | float value # value between 0 and 1. setNativeInstrumentEffect | instrument_t instrument_id | const_char* effect_name | float value # value is native format. dyn_t getInstrumentEffects | instrument_t instrument_id # returns a hash table of effect_name/value pairs. void setInstrumentEffects | instrument_t instrument_id | dyn_t effects | bool set_default_values_for_unspecified_effects ? false undoInstrumentEffect | instrument_t instrument_id | const_char* effect_name int getInstrumentEffectType | instrument_t instrument_id | const_char* effect_name # Return values: 0==float, 1==int, 2==bool const_char* getInstrumentEffectColor | instrument_t instrument_id | const_char* effect_name # midi learn bool instrumentEffectHasMidiLearn | instrument_t instrument_id | const_char* effect_name void addInstrumentEffectMidiLearn | instrument_t instrument_id | const_char* effect_name void removeInstrumentEffectMidiLearn | instrument_t instrument_id | const_char* effect_name bool instrumentEffectMidiLearnIsIncremental | instrument_t instrument_id | const_char* effect_name void setInstrumentEffectMidiLearnIsIncremental | instrument_t instrument_id | const_char* effect_name | bool is_incremental bool addAutomationToCurrentEditorTrack | instrument_t instrument_id | const_char* effect_name bool addAutomationToCurrentSequencerTrack | instrument_t instrument_id | const_char* effect_name void setInstrumentEffectChangesValueWhenPressingRandom | instrument_t instrument_id | const_char* effect_name | bool doit bool getInstrumentEffectChangesValueWhenPressingRandom | instrument_t instrument_id | const_char* effect_name void startRecordingInstrumentAutomationInEditor | instrument_t instrument_id | const_char* effect_name | bool do_start_recording_not_stop_recording ? true # returns the actual value instead of the stored value. (actual value can be different from stored value if set by automation.) # Should probably only be used displaying graphics. bool getInstrumentSolo | instrument_t instrument_id ? createIllegalInstrument() bool getInstrumentMute | instrument_t instrument_id ? createIllegalInstrument() bool getInstrumentBypass | instrument_t instrument_id ? createIllegalInstrument() # Returns the stored value instead of the actual value. (actual value can be different from stored value if set by automation.) # Should be used to determine whether value is on or off before doing an action. bool getInstrumentSoloFromStorage | instrument_t instrument_id ? createIllegalInstrument() bool getInstrumentMuteFromStorage | instrument_t instrument_id ? createIllegalInstrument() bool getInstrumentBypassFromStorage | instrument_t instrument_id ? createIllegalInstrument() void setInstrumentSolo | bool do_solo | instrument_t instrument_id ? createIllegalInstrument() void setInstrumentMute | bool do_mute | instrument_t instrument_id ? createIllegalInstrument() void setInstrumentBypass | bool do_bypass | instrument_t instrument_id ? createIllegalInstrument() bool switchInstrumentSolo | instrument_t instrument_id ? createIllegalInstrument() # returns new value bool switchInstrumentMute | instrument_t instrument_id ? createIllegalInstrument() # returns new value bool switchInstrumentBypass | instrument_t instrument_id ? createIllegalInstrument() # returns new value void setSoloForInstruments | dynvec_t instruments | bool doit void setMuteForInstruments | dynvec_t instruments | bool doit void setBypassForInstruments | dynvec_t instruments | bool doit void switchSoloForSelectedInstruments # Note: Operates on getExtendedSelectedInstruments. void switchMuteForSelectedInstruments # Note: Operates on getExtendedSelectedInstruments. void switchBypassForSelectedInstruments # Note: Operates on getExtendedSelectedInstruments. bool atLeastOneInstrumentHasSolo bool instrumentIsImplicitlyMuted | instrument_t instrument_id # For UI only. Note that it currently returns #t also if instrument is explicitly muted. bool instrumentIsImplicitlySoloed | instrument_t instrument_id # For UI only. Note that it currently returns #t also if instrument is explicitly soloed. #setInstrumentVolume | instrument_t instrument_id | float volume #float getInstrumentVolume | instrument_t instrument_id float getMinDb # used by meters and volume sliders float getMaxDb # used by meters and volume sliders float getMaxVolumeSliderDb float dbToGain | float db float gainToDb | float gain bool instrumentIsAudio | instrument_t instrument_id int getNumMIDIInstruments instrument_t getMIDIInstrumentId | int instrument_num int getNumAudioInstruments # <-- Warning, unlike other num/id-types, instrument_num != instrument_id instrument_t getAudioInstrumentId | int instrument_num # <-- ..., so we have to call this function to get id from num. Note that instrument_num might change at any time, while instrument_id is always unique, and will never change value for an instrument. int getAudioInstrumentNum | instrument_t instrument_id instrument_t getAudioBusId | int bus_num # return an instrument_id dynvec_t getInstruments dynvec_t getMidiInstruments dynvec_t getAudioInstruments dynvec_t getBuses bool instrumentIsBus | instrument_t instrument_id bool instrumentIsPermanent | instrument_t instrument_id float getInstrumentX | instrument_t instrument_id float getInstrumentY | instrument_t instrument_id setInstrumentPosition | float x | float y | instrument_t instrument_id | bool auto_slot ? false autopositionInstrument | instrument_t instrument_id # selection dynvec_t getCurrMixerInstruments # If there are no selected instruments, we return instrument_under_mouse. If mousePointerCurrentlyPointsAtInstrument() is false, we return selected instruments. If the instrument under mouse is selected, we return selected instruments. All other situations, we return instrument_under_mouse. dynvec_t getSelectedInstruments int numSelectedInstruments # dynvec_t getExtendedSelectedInstruments # If there are instruments selected, return those selected instruments. If not, return a vector containing the current instrument only. Note that it might return an empyt vector. Sometimes there isn't a current instrument. (replaced with getCurrMixerInstruments) bool instrumentIsSelected | instrument_t instrument_id void setInstrumentIsSelected | instrument_t instrument_id | bool doit void switchInstrumentIsSelected | instrument_t instrument_id const_char* getInstrumentInfo | instrument_t instrument_id # connections connectAudioInstrumentToMainPipe | instrument_t instrument_id bool autoconnectInstrument | instrument_t instrument_id | float x | float y int getNumInAudioConnections | instrument_t instrument_id int getNumOutAudioConnections | instrument_t instrument_id instrument_t getAudioConnectionSourceInstrument | int inconnection | instrument_t instrument_id instrument_t getAudioConnectionDestInstrument | int inconnection | instrument_t instrument_id undoMixerConnections createAudioConnection | instrument_t source_id | instrument_t dest_id | float gain ? 1.0 | int connection_type ? 1 # 'connection_type': See comment for getAudioConnectionType below. createEventConnection | instrument_t source_id | instrument_t dest_id void deleteAudioConnection | instrument_t source_id | instrument_t dest_id void deleteEventConnection | instrument_t source_id | instrument_t dest_id # Returns true if these four conditions are true: # 1. dest_id is not sending audio or events to source_id, somehow. (connecting these would not create a recursive connection, which is not supported) # 2. source_id is not already connected to dest_id directly. # 3. source_id has 1 or more audio outputs # 4. dest_id has 1 or more audio inputs. bool canAudioConnect | instrument_t source_id | instrument_t dest_id # changeAudioConnections: # # 'changes' is an array of hash tables. This function can create new connection, delete old connection, and change current connections. # If you want to change an already existing connections, set "type" to "connect". # The function will not create two connections when type is set to "connect" for an already existing connection. Instead it will modify it. # # This function should be used instead of doing several calls to createAudioConnection/deleteAudioConnection/setAudioConnectionGain/etc. # One call to this function is also much faster than calling more than one graph-changing function in sequence. # The changes are applied in one go, except if a temporary state would create a recursive graph, then it will be applied in at least two steps. # # Example: [{type: "connect", source: 5, target: 6}, # {type: "connect", source: 6, target: 7, connection-type: 0, gain: 0.2, enabled: 1}, # {type: "disconnect", source: 7, target: 8}]. # # * The function returns true if the audio graph was changed. It doesn't return until the changes have been applied. # # * See comment for 'getAudioConnectionType' for the description of connection types. # If "connection-type" is not set, connection type will not change if the connection already existed, and set to 2 (auto-determined) if it didn't already exist. # # * "enabled" should be set to 1 if connection should be enabled, and 0 if connection should be disabled. # If "enabled" is not set, enable status will not change for already existing connections, and enabled for new connections. # bool changeAudioConnections | dynvec_t changes bool hasAudioConnection | instrument_t source_id | instrument_t dest_id bool hasEventConnection | instrument_t source_id | instrument_t dest_id bool getConnectionImplicitlyDisabled | instrument_t source_id | instrument_t dest_id # returns true if source is bypassed and dest is a system bus. bool getConnectionEnabled | instrument_t source_id | instrument_t dest_id | bool show_error_if_not_connected ? true void setConnectionEnabled | instrument_t source_id | instrument_t dest_id | bool is_enabled | bool redraw_mixer_strips ? true # Redraw all mixer strips since there might be more than one mixer strips window visible. Note: setting an event connection to false currently doesn't do anything. void undoConnectionEnabled | instrument_t source_id | instrument_t dest_id float getAudioConnectionGain | instrument_t source_id | instrument_t dest_id | bool show_error_if_not_connected ? true void setAudioConnectionGain | instrument_t source_id | instrument_t dest_id | float gain | bool redraw_mixer_strips ? true # Redraw all mixer strips since there might be more than one mixer strips window visible. void undoAudioConnectionGain | instrument_t source_id | instrument_t dest_id # audio connection types: # 0 = send # 1 = plugin # 2 = auto-determined. int getAudioConnectionType | instrument_t source_id | instrument_t dest_id void setAudioConnectionType | instrument_t source_id | instrument_t dest_id | int audio_connection_type int getNumInEventConnections | instrument_t instrument_id int getNumOutEventConnections | instrument_t instrument_id instrument_t getEventConnectionSourceInstrument | int inconnection | instrument_t instrument_id instrument_t getEventConnectionDestInstrument | int inconnection | instrument_t instrument_id bool hasEventConnectionUnderMouse bool hasAudioConnectionUnderMouse instrument_t getEventConnectionUnderMouseSourceInstrument instrument_t getEventConnectionUnderMouseDestInstrument instrument_t getAudioConnectionUnderMouseSourceInstrument instrument_t getAudioConnectionUnderMouseDestInstrument # mixer config (a/b) void setCurrMixerConfigNum | int num void resetMixerConfigNum | int num ? -1 # if -1, reset all. bool mixerConfigNumIsUsed | int num bool includeAudioConnectionsInMixerConfig void setIncludeAudioConnectionsInMixerConfig | bool doit bool includeEventConnectionsInMixerConfig void setIncludeEventConnectionsInMixerConfig | bool doit bool includeVolumeInMixerConfig void setIncludeVolumeInMixerConfig | bool doit bool includePanningInMixerConfig void setIncludePanningInMixerConfig | bool doit bool includeMuteSoloBypassInMixerConfig void setIncludeMuteSoloBypassInMixerConfig | bool doit bool includeSystemEffectsInMixerConfig void setIncludeSystemEffectsInMixerConfig | bool doit bool includeInstrumentEffectsInMixerConfig void setIncludeInstrumentEffectsInMixerConfig | bool doit bool includeInstrumentStatesInMixerConfig void setIncludeInstrumentStatesInMixerConfig | bool doit bool includeMixerStripsConfigurationInMixerConfig void setIncludeMixerStripsConfigurationInMixerConfig | bool doit bool includeRememberCurrentInstrumentInMixerConfig void setIncludeRememberCurrentInstrumentInMixerConfig | bool doit bool includeModulatorConnectionsInMixerConfig void setIncludeModulatorConnectionsInMixerConfig | bool doit bool includeSystemVolumeInMixerConfig void setIncludeSystemVolumeInMixerConfig | bool doit # modulators instrument_t createModulator # returns modulator_instrument_id bool hasModulator | instrument_t instrument_id | const_char* effect_name void addModulator | instrument_t instrument_id | const_char* effect_name | instrument_t modulator_instrument_id ? createIllegalInstrument() void replaceModulator | instrument_t instrument_id | const_char* effect_name | instrument_t modulator_instrument_id ? createIllegalInstrument() void removeModulator | instrument_t instrument_id | const_char* effect_name const_char* getModulatorDescription | instrument_t instrument_id | const_char* effect_name const_char* getModulatorDescription2 | instrument_t instrument_id | int effect_num const_char* getModulatorDescription3 | instrument_t modulator_instrument_id dynvec_t getModulatorInstruments dynvec_t getModulatorTargets | instrument_t modulator_instrument_id void setModulatorEnabled | instrument_t instrument_id | const_char* effect_name | bool enabled bool getModulatorEnabled | instrument_t instrument_id | const_char* effect_name int getNumInputChannels | instrument_t instrument_id int getNumOutputChannels | instrument_t instrument_id deleteInstrument | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() # Note that undo is not created if deleting a MIDI instrument. void internalReplaceMainPipe | instrument_t new_main_pipe_id # should not be used for anything other than converting main pipe to main bus when loading old song. instrument_t internalReplacePermanent | instrument_t id_old | instrument_t id_new # should not be used for anything other than converting main pipe to main bus when loading old song. instrument_t getMainPipeInstrument bool instrumentIsOpen | instrument_t instrument_id # returns false if the instrument has been deleted. bool instrumentIsOpenAndAudio | instrument_t instrument_id # returns false if the instrument has been deleted or instrument is not an audio instrument. bool instrumentIsVisible | instrument_t instrument_id # returns false if instrument is not visible in mixer (used by temporary instruments). filepath_t getSampleBookmarks | int num | filepath_t default_path ? getHomePath() void setSampleBookmarks | int num | filepath_t default_path ? getHomePath() # midi bool doSplitIntoMonophonicTracksAfterRecordingFromMidi void setSplitIntoMonophonicTracksAfterRecordingFromMidi | bool doit bool doUseTrackChannelForMidiInput void setUseTrackChannelForMidiInput | bool doit bool isSendingMidiInputToCurrentInstrument void setSendMidiInputToCurrentInstrument | bool doit instrument_t createMIDIInstrument | const_char* name setInstrumentData | instrument_t instrument_id | const_char* key | const_char* value const_char* getInstrumentData | instrument_t instrument_id | const_char* key midi_resetAllControllers midi_localKeyboardOn midi_localKeyboardOff midi_allNotesOff midi_allSoundsOff midi_recordAccurately | bool accurately midi_alwaysRecordVelocity | bool doit midi_setInputPort # play note int playNote | float pitch | float velocity | float pan | int midi_channel | instrument_t instrument_id # returns a playnote_id changeNotePitch | float pitch | int playnote_id | int midi_channel | instrument_t instrument_id # todo, change name, for instance to changePlayingNotePitch. stopNote | int playnote_id | int midi_channel | instrument_t instrument_id # effect monitors. 'func' is not called immediately when an effect changes value, but instead checked at regular intervals (15ms). # Note that the callback might be called as often as each 15ms, so it should preferably not allocate memory or do heavy operations. int64_t addEffectMonitor | const_char* effect_name | instrument_t instrument_id | bool monitor_stored | bool monitor_automation | func_t* func removeEffectMonitor | int64_t effect_monitor_id | bool throw_exception_if_not_found # mixer strips redrawMixerStrips | bool immediately ? true # Internal function. Must be called when current instrument changes. remakeMixerStrips | instrument_t instrument_id ? createIllegalInstrument() # Internal function. Must be called in case mixer connections has changed, instrument has been added, or instrument has been removed. (if instrument_id==-1, all instruments are remade. if instrument_id==-2, no instruments are remade (only order may be updated)). bool hasWideInstrumentStrip | instrument_t instrument_id void setWideInstrumentStrip | instrument_t instrument_id | bool is_wide bool switchWideInstrumentStrip | instrument_t instrument_id ? getCurrentInstrumentUnderMouse() void setMixerStripCommentsVisible | bool val bool mixerStripCommentsVisible void setIncludePanAndDryInWetSignal | bool val bool includePanAndDryInWetSignal void setMuteSystemBusesWhenBypassed | bool val bool muteSystemBusesWhenBypassed bool enableSampleSeekByDefault void setEnableSampleSeekByDefault | bool doit #/******************************************* # sound plugin registry #/******************************************* int getSoundPluginRegistryGeneration # Generation is increased before each time getSoundPluginRegistry will return a different result than the last time. (first generation is 0) dynvec_t getSoundPluginRegistry | bool only_normal_and_containers ? false # returns an array of soundpluginregistry entries dynvec_t populatePluginContainer | dyn_t entry # entry must be a container entry. Returns soundpluginregistry entries for the container. void clearSoundPluginRegistry #/******************************************* # Requester #*******************************************/ setDefaultColors1 setDefaultColors2 configSystemFont configFonts | int windownum ? -1 setDefaultEditorFont setDefaultSystemFont void setEditorFont | const_char* fontdescr void setSystemFont | const_char* fontdescr const_char* getEditorFont const_char* getSystemFont const_char* getSampleBrowserFont | bool mono_font configWindow | int windownum ? -1 configBlock | int blocknum ? -1 | int windownum ? -1 configVST | int windownum ? -1 bool vstConfigOpen filepath_t getLoadFilename | const_char* text | const_char* filetypes | filepath_t dir ? createIllegalFilepath() | const_char* type ? "" # sync. See gui_fileRequester for async version. filepath_t getSaveFilename | const_char* text | const_char* filetypes | filepath_t dir ? createIllegalFilepath() | const_char* type ? "" | const_char* default_suffix ? "" # sync. See gui_fileRequester for async version. openRequester | const_char* text | int width ? 50 | int height ? 20 # Be very careful. closeRequester must be put inside a finally clause. If not, keyboard may stop wo rking for the whole program. closeRequester # Safe to call even if openRequester had not been called. Then it's just a dummy operation. bool safeToCallCloseRequester # not reall necessary. Hack caused by the requesters being non-async. int requestInteger | const_char* text | int min | int max | bool standaline ? false | const_char* default_value ? "" float requestFloat | const_char* text | float min | float max | bool standaline ? false | const_char* default_value ? "" const_char* requestString | const_char* text | bool standalone ? false | const_char* default_value ? "" const_char* requestWString | const_char* text | bool standalone ? false | const_char* default_w_value ? "" bool requestWasCancelled # returns true if user pressed Escape or closed the window in the last call to requestInteger/requestFloat/requestString. (does not return true if user pressed return or gave an invalid value) # popupMenu #-------------- # Submenues can be created by using "[submenu start]" and "[submenu end]" # On/off entries can be created by prepending entries with "[check on]" or "[check off]". # Disabled entries can be prepended with "[disabled]" # Separator entries can be created by using "-----" # In scheme, the function "popup-menu" (defined in common2.scm) is a higher level interfaces to popupMenu. #int simplePopupMenu | const_char* texts # non-async. 'texts' is a string where each menu entry is separated by "%". Removed. Lots of trouble with synchronized menus, especially on osx. # # returns guinum int64_t popupMenu | dynvec_t menu_entry_texts | func_t* callback int64_t getLastHoveredPopupMenuEntry #internal function void hoverPopupMenuEntry | int entryid #internal function void rightclickPopupMenuEntry | int entryid #internal function. void addPopupMenuClosedCallback | func_t* callback # Callback is called if any popup menu is called. If callback returns #f, the callback will not be called again. void removePopupMenuClosedCallback | func_t* callback void colorDialog | const_char* initial_color | int64_t parentgui | func_t* callback const_char* requestMidiPort # Note: showMessage blocks the normal execution, which pauses some graphic updates and other things. # It's usually better to use 'show-async-message' or 'ra:addMessage' instead. 'show-async-message' is defined in gui.scm and has this signature: # (delafina (show-async-message :parentgui -2 # :text "" # :buttons '("OK") # :is-modal #t # :callback #f) const_char* showMessage | const_char* text | dyn_t buttons ? g_uninitialized_dyn const_char* showMessage2 | const_char* text void showAsyncMessage | const_char* text # Calls the 'show-async-message' scheme function. # Adds message to THE message window in the program (which is shown if it is not visible). Returns immediately. # 'html' is html format. Use getHtmlFromText to get html from plain text (e.g to display ""). void addMessage | const_char* html showWarning | const_char* text # Shows assertion reporter. 3rd party code must not call this function. (use showMessage, addMessage, or ra:show-async-message instead) showError | const_char* text # Shows assertion reporter. 3rd party code must not call this function. (use showMessage, addMessage, or ra:show-async-message instead) openProgressWindow | const_char* message | bool message_is_base64 ? false # closeProgressWindow should be put inside a finally clause when calling openProgressWindow. showProgressWindowMessage | const_char* message | bool force_show ? true showProgressWindowMessageIfOpen | const_char* message | bool force_show ? true closeProgressWindow bool progressWindowIsOpen showHomeHelpWindow showChanceHelpWindow showVelocityHelpWindow showFXTextHelpWindow showSwingHelpWindow showMixerHelpWindow showKeybindingsHelpWindow void showBpmTextHelpWindow void showLpbTextHelpWindow void showSignatureTextHelpWindow void showLzTrackHelpWindow void showTempoAutomationTrackHelpWindow #/************************************************************************ # Mouse (including functions to get positions of graphical objects, etc.) #************************************************************************/ ensureCleanStateOutsideMouseCycle # Internal function, called now an then when a mouse cycle isn't running cancelCurrentNode cancelIndicatorNode Place getPlaceFromY | float y | int blocknum ? -1 | int windownum ? -1 Place getPlaceInGridFromY | float y | int blocknum ? -1 | int windownum ? -1 # Note: Only approximately gridded (using floats in calculation instead of rationals) (apply "get-gridded-place" to place instead) Place getNextPlaceInGridFromY | float y | int blocknum ? -1 | int windownum ? -1 # Note: same limitation as getPlaceInGridFromY. Use get-gridded-place instead (found in mouse.scm). float getYFromPlace | Place place | int blocknum ? -1 | int windownum ? -1 Place getPlaceFromRealline | int realline | int blocknum ? -1 | int windownum ? -1 float getReallineY1 | int realline | int blocknum ? -1 | int windownum ? -1 float getReallineY2 | int realline | int blocknum ? -1 | int windownum ? -1 int getReallineFromY | float y | int blocknum ? -1 | int windownum ? -1 int getTopRealline | int blocknum ? -1 | int windownum ? -1 int getBotRealline | int blocknum ? -1 | int windownum ? -1 float getHalfOfNodeWidth float getTopVisibleY | int blocknum ? -1 | int windownum ? -1 float getBotVisibleY | int blocknum ? -1 | int windownum ? -1 setNoMouseTrack setMouseTrackToReltempo setMouseTrack | int tracknum # editor float getEditorX1 | int windownum ? -1 float getEditorX2 | int windownum ? -1 float getEditorY1 | int windownum ? -1 float getEditorY2 | int windownum ? -1 # block float getBlockHeaderY2 | int blocknum ? -1 | int windownum ? -1 # track float getTrackX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getBeatBarBorderX | int blocknum ? -1 | int windownum ? -1 int getTempoVisualizerTracknum int getBpmTracknum int getLpbTracknum int getSignatureTracknum int getLinenumTracknum int getBeatTracknum int getSwingTracknum int getTempoAutomationTracknum float getTrackPianorollX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackPianorollY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackPianorollX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackPianorollY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackNotesX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackNotesY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackNotesX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackNotesY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackFxX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackFxY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackFxX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getTrackFxY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getCenttextX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getCenttextY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getCenttextX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getCenttextY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getChancetextX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getChancetextY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getChancetextX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getChancetextY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSwingtextX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSwingtextY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSwingtextX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSwingtextY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocitytextX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocitytextY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocitytextX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getVelocitytextY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxtextX1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxtextY1 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxtextX2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxtextY2 | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getFxtextFxnumFromX | float x | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getLeftmostTrackNum int getRelTempoTrackNum int getTempoTrackNum int getLPBTrackNum int getSignatureTrackNum int getSwingTrackNum int getTempoColorTrackNum int getLinenumTrackNum #reltemposlider float getReltempoSliderX1 float getReltempoSliderY1 float getReltempoSliderX2 float getReltempoSliderY2 double getReltempo | int blocknum ? -1 | int windownum ? -1 undoReltempo | int blocknum ? -1 | int windownum ? -1 setReltempo | double reltempo | int blocknum ? -1 | int windownum ? -1 float getMinReltempo float getMaxReltempo void addBlockMultiplierMidiLearn void removeBlockMultiplierMidiLearn bool hasBlockMultiplierMidiLearn float getTrackSliderX1 | int blocknum ? -1 | int windownum ? -1 float getTrackSliderY1 | int blocknum ? -1 | int windownum ? -1 float getTrackSliderX2 | int blocknum ? -1 | int windownum ? -1 float getTrackSliderY2 | int blocknum ? -1 | int windownum ? -1 setTrackSliderIsMoving | bool is_moving | int windownum ? -1 bool getTrackSliderIsMoving | int windownum ? -1 float getEditorScrollbarX1 float getEditorScrollbarY1 float getEditorScrollbarX2 float getEditorScrollbarY2 float getEditorScrollbarScrollerX1 float getEditorScrollbarScrollerY1 | int blocknum ? -1 | int windownum ? -1 float getEditorScrollbarScrollerX2 float getEditorScrollbarScrollerY2 | int blocknum ? -1 | int windownum ? -1 float getTrackSliderPos | int blocknum ? -1 | int windownum ? -1 void setTrackSliderPos | float pos | int blocknum ? -1 | int windownum ? -1 setEditorScrollbarIsMoving | bool is_moving | int windownum ? -1 # track panning on/off bool getTrackPanOnOff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackPanOnOff | bool onoff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool switchTrackPanOnOff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # track volumening on/off bool getTrackVolumeOnOff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setTrackVolumeOnOff | bool onoff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool switchTrackVolumeOnOff | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # track panning sliders float getTrackPan | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 undoTrackPan | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #setTrackPan | float pan | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # track volumening sliders float getTrackVolume | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 undoTrackVolume | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #setTrackVolume | float volume | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #temponodes int getTemponodeAreaX1 int getTemponodeAreaY1 int getTemponodeAreaX2 int getTemponodeAreaY2 float getTemponodeMax | int blocknum ? -1 | int windownum ? -1 float getTemponodeX | int num float getTemponodeY | int num Place getTemponodePlace | int num | int blocknum ? -1 | int windownum ? -1 float getTemponodeValue | int num | int blocknum ? -1 | int windownum ? -1 setCurrentTemponode | int num | int blocknum ? -1 setIndicatorTemponode | int num | int blocknum ? -1 #pianoroll (gfx) int getPioanorollLowKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getPioanorollHighKey | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPianonoteX1 | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPianonoteY1 | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPianonoteX2 | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPianonoteY2 | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPianonoteValue | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getPianonotePlace | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getPianonoteLogtype | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setPianonoteLogtype | int logtype | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNumPianonotes | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setCurrentPianonote | int num | dyn_t note | int tracknum dyn_t getCurrentPianonote | int tracknum # returns note, or #f if there isn't a current pianonote. cancelCurrentPianonote void setCurrentPianoGhostNote | Place place_start | Place place_end | float value | int tracknum ? -1 void cancelCurrentPianoGhostNote bool hasCurrentPianoGhostNoteStart int getCurrentPianoGhostNoteTracknum # Returns -1 if there is no current ghost note Place getCurrentPianoGhostNoteStart Place getCurrentPianoGhostNoteEnd float getCurrentPianoGhostNoteValue addPianonotePitch | float value | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void showPianorollEraser | float pitch1 | float pitch2 | Place place1 | Place place2 | int tracknum | int blocknum ? -1 | int windownum ? -1 void hidePianorollEraser | int windownum ? -1 void showPianorollSelectionRectangle | float pitch1 | float pitch2 | Place place1 | Place place2 | int tracknum | int blocknum ? -1 | int windownum ? -1 void hidePianorollSelectionRectangle | int windownum ? -1 void copySelectedPianonotes | int tracknum ? -1 | int blocknum ? -1 void cutSelectedPianonotes | int tracknum ? -1 | int blocknum ? -1 void deleteSelectedPianonotes | int tracknum ? -1 | int blocknum ? -1 void pastePianonotes | float pitch ? getCurrentPianoGhostNoteValue() | Place start_place ? getCurrentPianoGhostNoteStart() | int tracknum ? getCurrentPianoGhostNoteTracknum() | int blocknum ? -1 # 'setPianonote' provides the same functionality as 'movePianonote', 'movePianonoteStart', and 'movePianonoteEnd', but in a less confusing way. Should probably use this function and not the other three. # * 'pianonotenum' is 0 for note start, getNumPianonotes() for note end, 1 for beginning / end of pitch 1, and so forth. # * Set 'value' to a negative number to keep the old value. # * Set 'place' to 'same-place to keep the old place. # dyn_t setPianonote | int pianonotenum | float value | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns noteid if moved, or else the note argument. dyn_t movePianonote | int pianonotenum | float value | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns noteid if moved, or else the note argument. dyn_t movePianonoteStart | int pianonotenum | float value | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns noteid if moved, or else the note argument. dyn_t movePianonoteEnd | int pianonotenum | float value | Place place | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns noteid if moved, or else the note argument. dyn_t addPianonote | float value | Place place | Place endplace | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # returns noteid, or -1 if note couldnt be made deletePianonote | int pianonotenum | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int placetest | Place dasplacevar | int windownum ? -1 Place placetest2 | int a | int b | int c #dyn_t testsomething | dyn_t arg #current bar/beat (editor) void setCurrentBar | int barnum | int blocknum ? -1 void setCurrentBeat | int barnum | int beatnum | int blocknum ? -1 dyn_t getCurrentBar # returns false, or a hash table with :bar and :blocknum dyn_t getCurrentBeat # returns false, or a hash table with :bar, :beat, and :blocknum void cancelCurrentBeat dyn_t getBeatAtRealline | int realline | int blocknum ? -1 | int windownum ? -1 # returns a hash table with :barnum and :beatnum, or an empty hash table if there is no beat is drawn in this realline. dyn_t getBeatAtPlace | Place place | int blocknum ? -1 | int windownum ? -1 # returns a hash table with :barnum and :beatnum, or an empty hash table if there is no beat is drawn in this realline. dynvec_t getBeats | int startline ? 0 | int endline ? -1 | int blocknum ? -1 | int windownum ? -1 Place getBeatStart | int barnum ? -1 | int beatnum ? -1 | int blocknum ? -1 Place getBeatEnd | int barnum ? -1 | int beatnum ? -1 | int blocknum ? -1 Place getBarStart | int barnum ? -1 | int blocknum ? -1 Place getBarEnd | int barnum ? -1 | int blocknum ? -1 bool hasBeat | int barnum ? -1 | int beatnum ? -1 | int blocknum ? -1 #pitchnums (gfx) int getNumPitchnums | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumX1 | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumY1 | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumX2 | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumY2 | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumX | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumY | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getPitchnumValue | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getPitchnumPlace | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #Place getPitchStart | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #int getPitchLogtype | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setCurrentPitchnum | int num | int tracknum ? -1 | int blocknum ? -1 setIndicatorPitchnum | int num | int tracknum ? -1 | int blocknum ? -1 int setPitchnum | int num | float value | Place place | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # if place is 'same-place, a new place will not be set. Returns new pitchnum. deletePitchnum | int pitchnum | int tracknum ? -1 | int blocknum ? -1 int addPitchnum | float value | Place place | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addPitchnumF | float value | float place | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 # Returns the node number, or -1 if a node was not created. setPitchnumLogtype | int logtype | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNotenumForPitchnum | int pitchnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool portamentoEnabled | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setNoteEndPitch | float value | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 enablePortamento | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 disablePortamento | dyn_t note | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSubtrackX1 | int subtracknum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getSubtrackX2 | int subtracknum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #fxs int getFx | const_char* fx_name | int tracknum ? -1 | instrument_t instrument_id ? createIllegalInstrument() | int blocknum ? -1 | int windownum ? -1 int addFx | float value | Place place | const_char* fx_name | int tracknum ? -1 | instrument_t instrument_id ? createIllegalInstrument() | int blocknum ? -1 | int windownum ? -1 int addFxF | float value | float place | const_char* fx_name | int tracknum ? -1 | instrument_t instrument_id ? createIllegalInstrument() | int blocknum ? -1 | int windownum ? -1 int addFxnode | float value | Place place | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int addFxnodeF | float value | float floatplace | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setFxnode | int fxnodenum | float value | Place place | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setFxnodeF | int fxnodenum | float value | float place | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setFxnodeLogtype | int logtype | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 deleteFxnode | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 Place getFxnodePlace | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxnodeValue | int num | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getFxnodeLogtype | int num | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 bool getFxEnabled | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 void setFxEnabled | bool is_enabled | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #fxs, gui/gfx/mouse requestFX | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #requestFXMousePos | int windownum ? -1 # doesn't work. In scheme, use ( :request-fx current-track-num ) instead. float getFxnodeX | int num | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxnodeY | int num | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 const_char* getFxName | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 instrument_t getFxInstrument | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 const_char* getFxString | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNumFxs | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getNumFxnodes | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxMinValue | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 float getFxMaxValue | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setCurrentFxnode | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setIndicatorFxnode | int fxnodenum | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 setNoMouseFx | int blocknum ? -1 | int windownum ? -1 setMouseFx | int fxnum | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 int getMouseFx | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 undoFxs | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #fxs, clipboard #Place getFxrangenodePlace | int fxnodenum | int fxnum | int rangetracknum #float getFxrangenodeValue | int num | int fxnum | int rangetracknum #int getFxrangenodeLogtype | int num | int fxnum | int rangetracknum #const_char* getFxrangeName | int fxnum | int rangetracknum #int getNumFxrangenodes | int fxnum | int rangetracknum #int getNumFxsInRange | int rangetracknum clearTrackFX | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #track widths float getTrackWidth | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 undoTrackWidth setTrackWidth | float new_width | int tracknum ? -1 | int blocknum ? -1 | int windownum ? -1 #modifier keys bool controlPressed #bool control2Pressed # linux/windows: Meta, osx: Alt bool horizontalModifierPressed # same as control2Pressed bool verticalModifierPressed # same as shiftPressed bool shiftPressed bool metaPressed bool altPressed #bool alt2Pressed # linux/windows: Alt, osx: Ctrl #mouse pointer setNormalMousePointer | int64_t guinum setPointingMousePointer | int64_t guinum setOpenHandMousePointer | int64_t guinum setClosedHandMousePointer | int64_t guinum setBlankMousePointer | int64_t guinum setDiagonalResizeMousePointer | int64_t guinum setVerticalResizeMousePointer | int64_t guinum setHorizontalResizeMousePointer | int64_t guinum setVerticalSplitMousePointer | int64_t guinum setHorizontalSplitMousePointer | int64_t guinum moveMousePointer | float x | float y | int windownum ? -1 moveAbsMousePointer | float x | float y | int windownum ? -1 bool isLeftMousePressed # Will only return true if clicking in one of the main widgets such as the editor/sequencer/mixer bool isRightMousePressed # Will only return true if clicking in one of the main widgets such as the editor/sequencer/mixer bool isMiddleMousePressed # Will only return true if clicking in one of the main widgets such as the editor/sequencer/mixer double getDoubleClickInterval # returns ms float getMousePointerX | int windownum ? -1 # Relative to editor. If windownum == -2, get mouse pointer pos from sequencer. float getMousePointerY | int windownum ? -1 # Relative to editor. If windownum == -2, get mouse pointer pos from sequencer. float getDeltaMouseX # Returns approx. number of horizontal pixels since last call to getDeltaMouseX. Result is only valid if hasDeltaMouse() returns true. float getDeltaMouseY # Returns approx. number of vertical pixels since last call to getDeltaMouseY. Result is only valid if hasDeltaMouse() returns true. bool hasDeltaMouse # Currently only available in Windows if RAWMOUSE.usFlags includes MOUSE_MOVE_RELATIVE. bool canMovePointer # If it returns false, we can be very certain that the mouse pointer can not be moved. If it returns true, we can be pretty certain that it can be moved. float getGlobalMousePointerX # returns abs x position for primary screen float getGlobalMousePointerY # returns abs y position for primary screen float getAbsMousePointerX | int windownum ? -1 # returns abs x position for the screen the window is placed in. float getAbsMousePointerY | int windownum ? -1 # returns abs x position for the screen the window is placed in. int getScreenWidth | int windownum ? -1 # returns width for the screen the window is placed in. int getScreenHeight | int windownum ? -1 # returns height for the screen the window is placed in. bool mousePointerInMixer #/******************************************* # Sequencer #*******************************************/ float getSequencerX1 # This function returns approx. the same value as getSequencerLeftPartX2, i.e. leftmost position for the seqblocks. float getSequencerX2 float getSequencerY1 float getSequencerY2 float getSeqtracksX1 float getSeqtracksX2 float getSeqtracksY1 float getSeqtracksY2 # Note: These four functions return values relative to the sequencer widget, not the editor (which is the case everywhere else). float getSequencerLeftPartX1 float getSequencerLeftPartX2 float getSequencerLeftPartY1 float getSequencerLeftPartY2 float getSequencerLeftPartButtonsY1 # The buttons below the seqtrack headers. bool getSequencerRightPartEmpty void setSequencerRightPartEmpty | bool is_empty # Note: These four functions return values relative to the sequencer widget, not the editor (which is the case everywhere else). float getSequencerRightPartX1 float getSequencerRightPartX2 float getSequencerRightPartY1 float getSequencerRightPartY2 void undoSeqblockFades | int seqblocknum | int seqtracknum void undoSeqtrackAutomations void undoSeqblockAutomation | int automationnum | int seqblocknum | int seqtracknum void undoSeqblock | int seqblocknum | int seqtracknum # Note, undoSeqblock must be used instead if the start position of the seqblock is changed. void undoSequencer int64_t getSequencerSongLengthInFrames int64_t getSequencerVisibleStartTime int64_t getSequencerVisibleEndTime void setSequencerVisibleStartTime | int64_t value void setSequencerVisibleEndTime | int64_t value void setSequencerSelectionRectangle | float x1 | float y1 | float x2 | float y2 void unsetSequencerSelectionRectangle # sequencer navigator float getSeqnavX1 float getSeqnavX2 float getSeqnavY1 float getSeqnavY2 float getSeqnavLeftSizeHandleX1 float getSeqnavLeftSizeHandleX2 float getSeqnavLeftSizeHandleY1 float getSeqnavLeftSizeHandleY2 float getSeqnavRightSizeHandleX1 float getSeqnavRightSizeHandleX2 float getSeqnavRightSizeHandleY1 float getSeqnavRightSizeHandleY2 # Recording void setSeqtrackIsRecording | int seqtracknum | bool is_recording bool seqtrackIsRecording | int seqtracknum | bool throw_error_if_seqtrack_is_not_for_audio ? true void setSeqtrackUseCustomRecordingConfig | int seqtracknum | bool use_custom bool getSeqtrackUseCustomRecordingConfig | int seqtracknum void setSeqtrackRecordFromSystemInput | int seqtracknum | bool record_from_system_input bool getSeqtrackRecordFromSystemInput | int seqtracknum void setSeqtrackRecordCompensateLatency | int seqtracknum | bool compensate_latency bool getSeqtrackRecordCompensateLatency | int seqtracknum void setSeqtrackRecordingMatrix | int seqtracknum | int input_channel | int soundfile_channel | bool enabled bool getSeqtrackRecordingMatrix | int seqtracknum | int input_channel | int soundfile_channel void resetSeqtrackRecordingOptions | int seqtracknum # seqtrack automation int addSeqAutomation | int64_t time1 | float value1 | int64_t time2 | float value2 | int effect_num | instrument_t instrument_id | int seqtracknum # returns seqtracknum. Note that if you need to know the nodenums of the two added nodes, and you don't know if the seqtrack already has this effect, it's more convenient to use addSeqAutomation2 instead. dyn_t addSeqAutomation2 | int64_t time1 | float value1 | int64_t time2 | float value2 | int effect_num | instrument_t instrument_id | int seqtracknum # returns a hash table with these three fields :automationnum :nodenum1 :nodenum2 replaceAllSeqAutomation | instrument_t old_instrument | instrument_t new_instrument int getNumSeqtrackAutomations | int seqtracknum bool getSeqAutomationEnabled | int automationnum | int seqtracknum void setSeqAutomationEnabled | int automationnum | int seqtracknum | bool is_enabled instrument_t getSeqAutomationInstrumentId | int automationnum | int seqtracknum int getSeqAutomationEffectNum | int automationnum | int seqtracknum const_char* getSeqAutomationColor | int automationnum | int seqtracknum float getSeqAutomationValue | int nodenum | int automationnum | int seqtracknum int64_t getSeqAutomationTime | int nodenum | int automationnum | int seqtracknum int getSeqAutomationLogtype | int nodenum | int automationnum | int seqtracknum int getNumSeqtrackAutomationNodes | int automationnum | int seqtracknum int addSeqAutomationNode | int64_t time | float value | int logtype | int automationnum | int seqtracknum void deleteSeqAutomationNode | int nodenum | int automationnum | int seqtracknum void setCurrSeqAutomationNode | int nodenum | int automationnum | int seqtracknum # Gfx. Paint filled node. cancelCurrSeqAutomationNode | int automationnum | int seqtracknum void setCurrSeqAutomation | int automationnum | int seqtracknum # gfx. Paints the nodes. cancelCurrSeqAutomation int getCurrSeqAutomationSeqtrack int getCurrSeqAutomation void setSeqAutomationNode | int64_t time | float value | int logtype | int nodenum | int automationnum | int seqtracknum float getSeqAutomationNodeX | int nodenum | int automationnum | int seqtracknum float getSeqAutomationNodeY | int nodenum | int automationnum | int seqtracknum # seqblock gain and so forth void setSeqblockGain | float new_gain | int64_t seqblockid float getSeqblockGain | int64_t seqblockid float getMaxSeqblockSampleGain | int64_t seqblockid void setSeqblockGrainStrictNoJitter | bool new_strict_no_jitter | int64_t seqblockid bool getSeqblockGrainStrictNoJitter | int64_t seqblockid void setSeqblockGrainOverlap | double new_gf | int64_t seqblockid double getSeqblockGrainOverlap | int64_t seqblockid void setSeqblockGrainLength | double new_gf | int64_t seqblockid double getSeqblockGrainLength | int64_t seqblockid void setSeqblockGrainJitter | double new_jitter | int64_t seqblockid double getSeqblockGrainJitter | int64_t seqblockid void setSeqblockGrainRamp | double new_ramp | int64_t seqblockid double getSeqblockGrainRamp | int64_t seqblockid int getSeqblockResamplerType | int64_t seqblockid # seqblock automation int getNumSeqblockAutomations | int seqblocknum | int seqtracknum const_char* getSeqblockAutomationName | int automationnum const_char* getSeqblockAutomationColor | int automationnum bool getSeqblockAutomationEnabled | int automationnum | int64_t seqblockid void setSeqblockAutomationEnabled | bool is_enabled | int automationnum | int64_t seqblockid double getSeqblockAutomationMinValue | int automationnum | int seqblocknum | int seqtracknum double getSeqblockAutomationMaxValue | int automationnum | int seqblocknum | int seqtracknum double getSeqblockAutomationDefaultValue | int automationnum | int seqblocknum | int seqtracknum const_char* getSeqblockAutomationDisplayString | double value | int automationnum | int seqblocknum | int seqtracknum float getSeqblockAutomationValue | int nodenum | int automationnum | int seqblocknum | int seqtracknum float getSeqblockAutomationValueForTime | int64_t time | int automationnum | int seqblocknum | int seqtracknum int64_t getSeqblockAutomationTime | int nodenum | int automationnum | int seqblocknum | int seqtracknum int getSeqblockAutomationLogtype | int nodenum | int automationnum | int seqblocknum | int seqtracknum int getNumSeqblockAutomationNodes | int automationnum | int seqblocknum | int seqtracknum int addSeqblockAutomationNode | int64_t time | float value | int logtype | int automationnum | int seqblocknum | int seqtracknum void deleteSeqblockAutomationNode | int nodenum | int automationnum | int seqblocknum | int seqtracknum void setCurrSeqblockAutomationNode | int nodenum | int automationnum | int seqblocknum | int seqtracknum void cancelCurrSeqblockAutomationNode | int automationnum | int seqblocknum | int seqtracknum void setCurrSeqblockAutomation | int automationnum | int seqblocknum | int seqtracknum void cancelCurrSeqblockAutomation void setSeqblockAutomationNode | int64_t time | float value | int logtype | int nodenum | int automationnum | int seqblocknum | int seqtracknum float getSeqblockAutomationNodeX | int nodenum | int automationnum | int seqblocknum | int seqtracknum float getSeqblockAutomationNodeY | int nodenum | int automationnum | int seqblocknum | int seqtracknum # song tempo automation void undoSeqtempo float getSeqtempoAreaX1 float getSeqtempoAreaY1 float getSeqtempoAreaX2 float getSeqtempoAreaY2 float getSeqtemponodeX | int nodenum float getSeqtemponodeY | int nodenum void setSeqtempoVisible | bool visible bool seqtempoVisible double getSeqtempoValue | int nodenum double getSeqtempoAbstime | int nodenum int getSeqtempoLogtype | int nodenum int getNumSeqtemponodes int addSeqtemponode | double abstime | double value | int logtype void deleteSeqtemponode | int nodenum void setCurrSeqtemponode | int nodenum void setSeqtemponode | double abstime | double value | int logtype | int nodenum void setSeqtempoLength | double end_time | bool do_shrink ? false double getSeqtempoLength int64_t getSeqtempoAbsabstime | double abstime double getSeqtempoMaxTempo void setSeqtempoMaxTempo | double max_tempo float getSeqtimelineAreaX1 float getSeqtimelineAreaY1 float getSeqtimelineAreaX2 float getSeqtimelineAreaY2 void setSeqIndicator | int64_t indicator_x_pos | double indicator_y ? -1 | int type ? 0 | const_char* color ? "" # indicator_x_pos in frames, indicator_y in gfx pos. type==0 means time indicator when mouse is not pressed, type=1 means everything else. color="" means default color. void cancelSeqIndicator # same as calling setSeqIndicatorPos(-1, -1, 0) bool seqIndicatorEnabled # returns false after calling cancelSeqIndicator, returns true after calling setSeqIndicatorPos. int64_t getSeqIndicatorXPos double getSeqIndicatorY int getSeqIndicatorType # returns 0 if seqindicator is not enabled. void setSeqlooping | bool do_loop | int64_t start ? -1 | int64_t end ? -1 # use this one to set both start and end at the same time to avoid separate auto-legalization when start and end are set separately. bool isSeqlooping void setSeqloopingStart | int64_t start int64_t getSeqloopingStart void setSeqloopingEnd | int64_t end int64_t getSeqloopingEnd void setSeqpunching | bool do_loop bool isSeqpunching void setSeqpunchingStart | int64_t start int64_t getSeqpunchingStart void setSeqpunchingEnd | int64_t end int64_t getSeqpunchingEnd # seqtracks void insertSeqtrackInternal | bool for_audiofiles | int pos | bool is_bus # Internal function. void insertSeqtrack | bool for_audiofiles | int pos ? -1 | bool is_bus ? false | bool force_insert ? false # if force_insert is false, program will ask user about whether to insert or not if it causes radium to start using sequencer timing. pos==-1 means current insert at current seqtrack. void insertEditorSeqtrack | int pos ? -1 | bool force_insert ? false # same as calling insertSeqtrack(false, pos, false, force_insert) void insertAudioSeqtrack | int pos ? -1 | bool force_insert ? false # same as calling insertSeqtrack(true, pos, false, force_insert) void insertBusSeqtrack | int pos ? -1 | bool force_insert ? false # same as calling insertSeqtrack(true, pos, true, force_insert) # The appendSeqtrack functions finds the last seqtrack of it's type and inserts there. (tries to insert at the most natural position) # If you want to create a new seqtrack and place it at the bottom of the list of seqtracks, use insertSeqtrack instead. int appendSeqtrack | bool for_audiofiles | bool is_bus ? false # same as insertSeqtrack(for_audiofiles, getNumSeqtracks(), is_bus). Returns seqtrack number. int appendEditorSeqtrack # same as calling appendSeqtrack(false) int appendAudioSeqtrack # same as calling appendSeqtrack(true) int appendBusSeqtrack # same as calling appendSeqtrack(true, true) bool seqtrackIsPermanent | int seqtracknum ? -1 # returns true for the main bus and the 5 effect buses. bool seqtrackIsBus | int seqtracknum ? -1 # returns true for the main bus and the 5 effect buses. void deleteSeqtrack | int seqtracknum ? -1 # program will ask user about whether to delete or not if it causes radium to start using sequencer timing. void forceDeleteSeqtrack | int seqtracknum ? -1 # will not ask. int getNumSelectedSeqblocks void setCurrSeqtrack | int seqtracknum | bool auto_scroll_to_make_seqtrack_visible ? true | bool change_curr_instrument ? false void setCurrSeqtrackDown | int num_seqtracks | bool auto_scroll_to_make_seqtrack_visible ? true void setCurrSeqtrackUp | int num_seqtracks | bool auto_scroll_to_make_seqtrack_visible ? true int getCurrSeqtrack int getNumSeqtracks int getLowestVisibleSeqtrack | bool must_be_fully_visible ? false int getTopmostVisibleSeqtrack void setTopmostVisibleSeqtrack | int new_topmost void autoscrollSeqtracks | int seqtracknum | bool make_fully_visible ? false # calls setTopmostVisibleSeqtrack (if necessary) to make sure seqtracknum >= getTopmostVisibleSeqtack() && seqtracknum <= getLowestVisibleSeqtrack. If make_fully_visible is false, it's enough to make seqtracknum partly visible. int getLowestPossibleTopmostVisibleSeqtrack # Returns the seqtrack that is at the top when the the seqtrack slider is at the bottom. void moveSeqtrack | int seqtracknum | int new_pos void swapSeqtracks | int seqtracknum1 | int seqtracknum2 instrument_t getSeqtrackInstrument | int seqtracknum bool seqtrackForAudiofiles | int seqtracknum void setSeqtrackName | const_char* name | int seqtracknum const_char* getSeqtrackName | int seqtracknum void setSeqtrackVisible | int seqtracknum | bool is_visible # Note: NOT necessarily visible on screen, but instead marked as visible in the "Tracks" tab. bool getSeqtrackVisible | int seqtracknum setSeqtracksVisible | dynvec_t seqtracknums | bool is_visible # Much more efficient than calling setSeqtrackVisible() many times. 'seqtracknums' must be a list of integers. const_char* getSeqtrackUuid | int seqtracknum #dyn_t getSeqtrackConfig #void setSeqtrackConfig | dyn_t config void setCurrSeqtrackConfigNum | int num int getCurrSeqtrackConfigNum bool seqtrackConfigIsUsed | int num # E.g. A* or B*. void resetSeqtrackConfig void undoSeqtrackNoteGain | int seqtracknum # also creates undo for editor seqtrack muted. void setSeqtrackNoteGain | float gain | int seqtracknum float getSeqtrackNoteGain | int seqtracknum void setEditorSeqtrackMuted | bool muteit | int seqtracknum bool getEditorSeqtrackMuted | int seqtracknum bool getSeqtrackMute | int seqtracknum ? -1 void setSeqtrackMute | bool do_mute | int seqtracknum ? -1 bool switchSeqtrackMute | int seqtracknum ? -1 bool getSeqtrackSolo | int seqtracknum ? -1 # Returns false for editor seqtracks. void setSeqtrackSolo | bool do_solo | int seqtracknum ? -1 # Silently does nothing for editor seqtracks. bool switchSeqtrackSolo | int seqtracknum ? -1 # Silently does nothing for editor seqtracks. Return value is false for editor seqtracks. float getSeqtrackX1 | int seqtracknum float getSeqtrackX2 | int seqtracknum float getSeqtrackY1 | int seqtracknum float getSeqtrackY2 | int seqtracknum int getSeqtrackFromY | int y # Note 1: Not that much tested (the function is currently not used in the program itself). Note 2: Is not forgiving (see getCurrSeqtrackUnderMouse). Returns -1 if y is not inside a seqtrack. double getSeqtrackBorderWidth # Note: getSeqtrackBorderWidth() is equal to getSeqtrackY1(1)-getSeqtrackY2(0), getNumSeqtracks()>1. # type: # 0 = custom size (i.e. current size) # 1 = 1 row (i.e. show one slider in seqtrack header) # 2 = 2 rows (i.e. show two sliders in seqtrack header) # 3 = 3 rows (i.e. show three sliders in seqtrack header) # 4 = unlimited int getSeqtrackMinHeightType | int seqtracknum ? -1 void setSeqtrackMinHeightType | int new_type | int seqtracknum ? -1 int getSeqtrackMaxHeightType | int seqtracknum ? -1 void setSeqtrackMaxHeightType | int new_type | int seqtracknum ? -1 # sequencer grid # grid_type must be "no", "line", "beat", "bar", or "current" void setSequencerGridType | const_char* grid_type const_char* getSequencerGridType bool sequencerGridEnabled void setSequencerGridEnabled | bool val bool switchSequencerGridEnabled void setPaintSequencerGrid | bool doit int64_t getSeqGriddedTime | int64_t pos | const_char* grid_type ? "current" int64_t findClosestSeqtrackBarStart | int seqtracknum | int64_t pos int64_t findClosestSeqtrackBeatStart | int seqtracknum | int64_t pos int64_t findClosestSeqtrackLineStart | int seqtracknum | int64_t pos void insertSilenceToSeqtrack | int seqtracknum | int64_t pos | int64_t duration # playlist playlistInsert # Same as pressing the "Insert" button. playlistRemove # Same as pressing the "Remove" button. playlistUp # Same as pressing the "Up" button. playlistDown # Same as pressing the "Down" button. int getCurrBlocklistPos void setCurrBlocklistPos | int pos int getCurrPlaylistPos void setCurrPlaylistPos | int new_pos | bool also_set_curr_seqblock ? true | bool also_set_new_song_pos ? true void lockCurrPlaylistPosToCurrSeqblock | bool doit # Note: Should only be set to True temporarily, for instance while moving a seqblock. Protect access with try/failure to ensure value is not stuck to True. int64_t getPlaylistPosTime | int pos ? -1 # seqblocks int createSeqblock | int seqtracknum ? -1 | int blocknum ? -1 | int64_t pos ? -1 | int64_t endpos ? -1 int createSampleSeqblock | int seqtracknum | filepath_t w_filename | int64_t pos ? -1 | int64_t endpos ? -1 const_char* getAudiofilePostfixes bool addAudiofile | filepath_t w_filename # Add to pool (shown in blocklist) int64_t getAudioFilesGeneration # If caching the result of getAudioFiles, use this value to check if cache is dirty. dynvec_t getAudioFiles # returns a vector of filepaths (all used audio files and all audio files added via 'addAudioFile') int createGfxGfxSeqblock | dyn_t state # "GfxGfx"-seqblocks are seqblocks currently being moved. 'state' must contain :seqtracknum int createSeqblockFromState | dyn_t state # 'state' must contain :seqtracknum dyn_t getSeqblockState | int seqblocknum | int seqtracknum # the returned hash table includes :seqtracknum int getPlaylistPosForSeqblock | int64_t seqblockid void setCurrSeqblock | int64_t seqblockid int64_t getCurrSeqblockId # returns -2 if there is no current seqblock. Never returns -1, always return the actual id. (-1 is usually interpreted as current seqblock when used as seqblock_id argument) void cancelCurrSeqblock void selectNextSeqblock void selectPrevSeqblock # int getCurrSeqblock # instead, use getSeqblockSeqblockNum # int getCurrSeqtrack # instead, use getSeqblockSeqtrackNum void setCurrSeqblockUnderMouse | int64_t seqblockid int64_t getCurrSeqblockIdUnderMouse void cancelCurrSeqblockUnderMouse int getCurrSeqblockUnderMouse int getCurrSeqtrackUnderMouse | bool forgiving ? true | bool only_inside_timeline ? false # if forgiving==false, function returns -1 even if mouse is between two seqtracks. setCurrSeqtrackUnderMouse | int seqtracknum # Set seqtracknum to -1 to cancel void setCurrEditorBlockUnderMouseForSequencer | int blocknum # Internal. This function is called when the mouse pointer is above an editor block in a block selector. int getCurrEditorBlockUnderMouseForSequencer # If blocknum==-1, use currSeqblockUnderMouse instead. void setCurrSampleUnderMouseForSequencer | filepath_t filepath # Internal. This function is called when the mouse pointer is above a sample in a sample viewer filepath_t getCurrSampleUnderMouseForSequencer # If isIllegalFilepath(filepath), use currSeqblockUnderMouse instead. bool seqblockIsAlive | int64_t seqblockid dyn_t getSeqblocksState | int seqtracknum dyn_t getGfxSeqblocksState | int seqtracknum void createGfxSeqblocksFromState | dyn_t seqblocks_state | int seqtracknum # Note: cancelGfxSeqblocks or applyGfxSeqblocks must always be called later. (must be protected inside a try-finally) void cancelGfxSeqblocks | int seqtracknum void applyGfxSeqblocks | int seqtracknum # Note: Similary to createGfxSeqblocksFromState, applyGfxSeqblocks should also be protected by try-finally, and call cancelGfxSeqblocks if it fails. dynvec_t getBlockUsageInSequencer # Returns an array of the number of times each block has been used in the sequencer. void setSeqblockName | const_char* new_name | int64_t seqblockid | bool name_is_base64 ? true const_char* getSeqblockName | int64_t seqblockid # returns base64 int getNumSeqblocks | int seqtracknum int getNumGfxGfxSeqblocks | int seqtracknum int64_t getSeqblockStartTime | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false int64_t getSeqblockEndTime | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false int64_t getSeqblockDefaultDuration | int seqblocknum | int seqtracknum # seqblock area float getSeqblockX1 | int seqblocknum | int seqtracknum float getSeqblockX2 | int seqblocknum | int seqtracknum float getSeqblockY1 | int seqblocknum | int seqtracknum float getSeqblockY2 | int seqblocknum | int seqtracknum # seqblock select box void setSeqblockSelectedBox | int which_one | int seqblocknum | int seqtracknum int getSeqblockSelectedBox float getSeqblockHeaderY2 | int seqblocknum | int seqtracknum const_char* getSeqblockColor | int64_t seqblockid # returns block color for editor block seqblocks and audiofile color for audio seqblocks. # seqblock left fade area float getSeqblockLeftFadeX1 | int seqblocknum | int seqtracknum float getSeqblockLeftFadeY1 | int seqblocknum | int seqtracknum float getSeqblockLeftFadeX2 | int seqblocknum | int seqtracknum float getSeqblockLeftFadeY2 | int seqblocknum | int seqtracknum # seqblock right fade area float getSeqblockRightFadeX1 | int seqblocknum | int seqtracknum float getSeqblockRightFadeY1 | int seqblocknum | int seqtracknum float getSeqblockRightFadeX2 | int seqblocknum | int seqtracknum float getSeqblockRightFadeY2 | int seqblocknum | int seqtracknum # seqblock left interior area float getSeqblockLeftInteriorX1 | int seqblocknum | int seqtracknum float getSeqblockLeftInteriorY1 | int seqblocknum | int seqtracknum float getSeqblockLeftInteriorX2 | int seqblocknum | int seqtracknum float getSeqblockLeftInteriorY2 | int seqblocknum | int seqtracknum # seqblock right interior area float getSeqblockRightInteriorX1 | int seqblocknum | int seqtracknum float getSeqblockRightInteriorY1 | int seqblocknum | int seqtracknum float getSeqblockRightInteriorX2 | int seqblocknum | int seqtracknum float getSeqblockRightInteriorY2 | int seqblocknum | int seqtracknum # seqblock left speed area float getSeqblockLeftSpeedX1 | int seqblocknum | int seqtracknum float getSeqblockLeftSpeedY1 | int seqblocknum | int seqtracknum float getSeqblockLeftSpeedX2 | int seqblocknum | int seqtracknum float getSeqblockLeftSpeedY2 | int seqblocknum | int seqtracknum # seqblock right speed area float getSeqblockRightSpeedX1 | int seqblocknum | int seqtracknum float getSeqblockRightSpeedY1 | int seqblocknum | int seqtracknum float getSeqblockRightSpeedX2 | int seqblocknum | int seqtracknum float getSeqblockRightSpeedY2 | int seqblocknum | int seqtracknum # seqblock left stretch multiplier area float getSeqblockLeftStretchX1 | int seqblocknum | int seqtracknum float getSeqblockLeftStretchY1 | int seqblocknum | int seqtracknum float getSeqblockLeftStretchX2 | int seqblocknum | int seqtracknum float getSeqblockLeftStretchY2 | int seqblocknum | int seqtracknum # seqblock right stretch multiplier area float getSeqblockRightStretchX1 | int seqblocknum | int seqtracknum float getSeqblockRightStretchY1 | int seqblocknum | int seqtracknum float getSeqblockRightStretchX2 | int seqblocknum | int seqtracknum float getSeqblockRightStretchY2 | int seqblocknum | int seqtracknum double getSeqblockFadeIn | int seqblocknum | int seqtracknum double getSeqblockFadeOut | int seqblocknum | int seqtracknum void setSeqblockFadeIn | double fadein | int seqblocknum | int seqtracknum void setSeqblockFadeOut | double fadeout | int seqblocknum | int seqtracknum dynvec_t getFadeShapes const_char* getFadeShapeIconFilename | const_char* shape | bool is_fadein const_char* getSeqblockFadeShape | bool is_fadein | int seqblocknum | int seqtracknum bool setSeqblockFadeShape | const_char* shape | bool is_fadein | int seqblocknum | int seqtracknum # SeqblockGfxGfx = GfxGfx seqblocks only show gfx. Not used for audio. Used when moving several seqblocks (the half-transparent orange seqblocks). void deleteSeqblock | int64_t seqblockid ? -1 | bool notify_listeners ? true # notify_listeners should be set to false if you are going to recreate the seqblock right after, for instance when moving a seqblock. void deleteGfxGfxSeqblock | int seqblocknum | int seqtracknum int getSeqblockBlocknum | int seqblocknum | int seqtracknum filepath_t getSeqblockSample | int seqblocknum | int seqtracknum int64_t getSampleLength | filepath_t w_sample void selectSeqblock | bool is_selected | int seqblocknum | int seqtracknum ? -1 bool isSeqblockSelected | int seqblocknum | int seqtracknum ? -1 void generateNewColorForAllSelectedSeqblocks | float mix_background ? 1.0 # mix_background must be between 0 and 1. Note: If no seqblock is selected, it will generate for the current seqblock instead. void unsetAllSelectedSeqblocks bool isSeqblockTrackEnabled | int tracknum | int seqblocknum | int seqtracknum ? -1 void setSeqblockTrackEnabled | bool is_enabled | int tracknum | int seqblocknum | int seqtracknum ? -1 void copyEditorTrackOnOffToSeqblock | int seqblocknum ? -1 | int seqtracknum ? -1 void copySeqblockTrackOnOffToEditor | int seqblocknum ? -1 | int seqtracknum ? -1 bool seqblockHoldsBlock | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false bool seqblockHoldsSample | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false # Stretch=1.0: No tempo change. # Stretch=0.5: Double tempo. # Stretch=2.0: Half tempo. # To set stretch, use positionSeqblock. double getSeqblockStretch | int64_t seqblockid | bool use_gfx_if_possible ? false double getSeqblockSpeed | int64_t seqblockid | bool use_gfx_if_possible ? false double getSeqblockStretchSpeed | int64_t seqblockid | bool use_gfx_if_possible ? false double getSeqblockResampleRatio | int64_t seqblockid | bool use_gfx_if_possible ? false int64_t getSeqblockId | int seqblocknum | int seqtracknum int getSeqblockSeqtrackNum | int64_t seqblockid int getSeqblockSeqblockNum | int64_t seqblockid void addSeqblockDeletedCallback | func_t* callback # If callback returns #f, the callback will not be called again. void removeSeqblockDeletedCallback | func_t* callback void markSeqblockAvailable | int64_t seqblockid # deleted callback will not be called if marked as available. Must by protected by try/failure to ensure unmarkSeqblockAvailable is always called when finished. void unmarkSeqblockAvailable | int64_t seqblockid dynvec_t getSeqblocknumZOrder | int seqtracknum # returns array of seqblocknums dynvec_t getSeqblockZOrder | int seqtracknum # returns array of seqblock ids void setSeqblockZOrder | dynvec_t zorder | int seqtracknum # zorder must be an array of seqblock ids. # These four functions were too inconvenient (and never implemented properly), and therefore removed. Use getSeqblocksState/createGfxSeqblocksFromState/applyGfxSeqblocks instead. (see bin/scheme/mouse.scm) #bool setSeqblockInteriorStart | int64_t interior_start | int seqblocknum | int seqtracknum # returns true if something was changed #bool setSeqblockInteriorStartGfx | int64_t interior_start | int seqblocknum | int seqtracknum # returns true if something was changed #bool setSeqblockInteriorEnd | int64_t interior_end | int seqblocknum | int seqtracknum # returns true if something was changed #bool setSeqblockInteriorEndGfx | int64_t interior_end | int seqblocknum | int seqtracknum # returns true if something was changed int64_t getSeqblockInteriorStart | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false int64_t getSeqblockInteriorEnd | int seqblocknum | int seqtracknum | bool use_gfx_if_possible ? false void cutSelectedSeqblocks void pasteSeqblocks | int seqtracknum ? -1 | int64_t time ? -1 void copySelectedSeqblocks void deleteSelectedSeqblocks # sequencer timing # # Note that calling 'setSequencerTempos' or 'setSequencerSignatures' might change both tempos and signatures, since # tempos must be aligned with beats, and signatures must be aligned with tempos. (these restrictions are only in sequencer timing mode by the way) # # If you need to change both signatures and tempos at the same time, call 'setSequencerTiming' instead of calling both 'setSequencerTempos' # and 'setSequencerSignatures'. If not, tempos and signatures might be repositioned more than necessary. # dynvec_t getSequencerTempos | int64_t start_time | int64_t end_time | bool include_all_tempos_needed_to_paint_graph ? true dynvec_t getAllSequencerTempos void setSequencerTempos | dynvec_t tempos # Can only be called in sequencer timing mode dynvec_t getSequencerSignatures | int64_t start_seqtime | int64_t end_seqtime dynvec_t getAllSequencerSignatures void setSequencerSignatures | dynvec_t signatures # Can only be called in sequencer timing mode dyn_t getSequencerTiming # returns a hash table with "tempos" and "signatures". Same as calling getAllSequencerTempos and getgetAllSequencerSignatures in sequencer timing mode. void setSequencerTiming | dyn_t state # state must be in the same format as returned by getSequencerTiming. Note that if the sequencer is not in sequencer timing mode, you won't see or hear any difference until you enable sequencer timing mode. dynvec_t getAllSequencerMarkers void setSequencerMarkers | dynvec_t markers bool doPaintVerticalMarkersInSequencer void setPaintVerticalMarkersInSequencer | bool doit void jumpToSequencerMark | int marknum void jumpPrevSequencerMark void jumpNextSequencerMark bool isUsingSequencerTiming void setUsingSequencerTiming | bool use_sequencer | bool make_undo ? true void iterateSequencerTime | int64_t start_time | int64_t end_time | const_char* grid_type | func_t* callback bool showBarsAndBeatsSequencerLane void setShowBarsAndBeatsSequencerLane | bool doit bool showTimeSequencerLane void setShowTimeSequencerLane | bool doit bool showTemposSequencerLane void setShowTemposSequencerLane | bool doit bool showSignaturesSequencerLane void setShowSignaturesSequencerLane | bool doit bool showMarkersSequencerLane void setShowMarkersSequencerLane | bool doit #/******************************************* # GUI #*******************************************/ # The 'color' format can either be a html string, for instance "#80ff0000" is red with 0x80 alpha, and "red" is just red. # But it can also be the name of a configurable color. See $HOME/.radium/colors. # A parentgui can be a normal gui, or one of these: # -1 = we use the main window as parent. # -2 = we use the current window. (this widget does not have to be created by one of the gui_* functions) # -3 = no parent. (NULL) # -4 = widget under cursor int gui_getSystemFontheight gui_toolTip | const_char* text const_char* gui_mixColors | const_char* color1 | const_char* color2 | float how_much_color1 const_char* gui_setAlphaForColor | const_char* color | float how_much_alpha const_char* gui_makeColorLighter | const_char* color | float how_much const_char* gui_makeColorDarker | const_char* color | float how_much double gui_colorDistance | const_char* color1 | const_char* color2 float gui_textWidth | const_char* text | int64_t guinum ? -1 int64_t gui_ui | filepath_t filename # Note that the toplevel widget in the ui file should be a widget, and not a dialog. (got dialogs to work, but they are a bit tricky, better to use widget) int gui_numOpenGuis # Useful to see if there is a GUI leakage. Guis are not automatically garbage collected and must be closed either explicitly, or implictly by closing the parent. void gui_postKeyEvent | int64_t guinum | int qtkeynum | int64_t qtmodifiers | bool is_pressing # Posts a qkeyevent to qApp. Should probably only be used for debugging, or forst testing something that is not possible to achieve without first recompiling radium. See also sendKeyEvent. int64_t gui_random # Returns a random gui. Used for testing. int64_t gui_child | int64_t guinum | const_char* childname void gui_setName | int64_t guinum | const_char* guiname # useful when using gui_child. void gui_addRealtimeCallback | int64_t guinum | func_t* callback # For instance, to get a callback for all characters typed into a QLineEdit. void gui_addCallback | int64_t guinum | func_t* callback bool gui_rerunLastMouseEvent # Call this function after changing the GUI to update current object under mouse / hightlighted object / etc. For instance after deleting something. # 'func' takes one argument: 'radium-runs-custom-exec', which is a boolean denoting whether radium currently runs a custom Qt::exec(). # If this argument is true, be careful about calling or functions. This can be difficult though, and the callback won't be called again if 'radium-runs-custom-exec' is true. # Something is most likely broken if 'radium-runs-custom-exec' is true though, so usually it's best to ignore this variable. If the destructor operations can be delayed a little bit, # this can be scheduled to run later using ( :schedule 1). void gui_addDeletedCallback | int64_t guinum | func_t* func # 'func' is called fater before gui is closed, and before gui is deleted. Several callbacks can be added. (also see gui_closeCallback) void gui_addAfterDeletedCallback | int64_t guinum | func_t* func # 'func' is called right after gui is closed, and after gui is deleted. Several callbacks can be added. (also see gui_closeCallback) void gui_addMouseCallback | int64_t guinum | func_t* func int gui_getCurrMouseButton | int64_t guinum # returns 0 if no button pressed, 1 if left mouse, 3 if middle, and 5 if right. (Same numbers as used in Radium elsewhere) void gui_addMouseWheelCallback | int64_t guinum | func_t* func void gui_removeMouseWheelCallback | int64_t guinum void gui_addKeyCallback | int64_t guinum | func_t* func void gui_addFocusInCallback | int64_t guinum | func_t* func void gui_addDoubleClickCallback | int64_t guinum | func_t* func bool gui_isDoubleClicking | int64_t guinum # can be called at any time, but it makes most sense to call it from the mouse callback. bool gui_supportsCallbacks | int64_t guinum # returns false if the gui was created internally by radium. # 'func' is called before gui is closed. If the callback returns #f, we don't close and delete the gui. Only one callback can be added. (also see gui_addDeletedCallback). # # Similar to the deleted callback, 'func' takes one argument. (see gui_addDeletedCallback). # Preferably, 'func' should only return #t or #f if 'radium-runs-custom-exec' is true. # In addition, the callback can also safely call ( :hide) even if 'radium-runs-custom-exec' is true. # # Note that the close callback is not always called (dialogs don't call it for instance). # It should only be used to denote if the gui should be hidden instead of deleted, or if asking "are you sure?", etc. # If not, addDeletedCallback should be used instead. void gui_addCloseCallback | int64_t guinum | func_t* func void gui_addResizeCallback | int64_t guinum | func_t* func void gui_addPaintCallback | int64_t guinum | func_t* func | bool paint_on_top ? false void gui_updateRecursively | int64_t guinum void gui_update | int64_t guinum | double x1 ? -1 | double y1 ? -1 | double x2 ? -1 | double y2 ? -1 # These two functions are internal. Use ( :do-clipped gui x1 y1 x2 y2 func) in gui.scm instead to ensure nested calls to gui_setClipRect/gui_cancelClipRect are done correctly. void gui_setClipRect | int64_t guinum | double x1 | double y1 | double x2 | double y2 void gui_cancelClipRect | int64_t guinum void gui_dontAutofillBackground | int64_t guinum # save some cycles if the gui paint callback paints all pixels. Does nothing if gui_setBackgroundColors has been called (or will be called) on the gui. This function, or gui_setBackgroundColor, should always be called if the gui contains vertical audio meters. int64_t gui_verticalAudioMeter | instrument_t instrument_id | dyn_t note_event_instrument_id ? g_dyn_minus_one # creates a new vertical audio meter gui. If note_event_instrument_id==-2, we ignore note events. int64_t gui_addVerticalAudioMeter | int64_t guinum | instrument_t instrument_id | double x1 | double y1 | double x2 | double y2 | dyn_t note_event_instrument_id ? g_dyn_minus_one # adds a new vertical audio meter to an existing gui. If note_event_instrument_id==-2, we ignore note events. void gui_setVerticalAudioMeterClipRect | int64_t vam | double x1 | double y1 | double x2 | double y2 bool gui_removeVerticalAudioMeter | int64_t vam | bool throw_error_if_not_found ? true # Removes a vertical audio meter from an existing gui. "vap" is the return value from gui_addVerticalAudioMeter. Returns true if vam existed. int gui_removeAllVerticalAudioMeters | int64_t guinum # returns number of vams removed. gui_addAudioMeterPeakCallback | int64_t guinum | func_t* func gui_resetAudioMeterPeak | int64_t guinum int64_t gui_widget | int width ? -1 | int height ? -1 int64_t gui_popup | int width ? -1 | int height ? -1 int64_t gui_button | const_char* text int64_t gui_checkbox | const_char* text | bool is_checked | bool radium_style ? false int64_t gui_radiobutton | const_char* text | bool is_checked int64_t gui_horizontalIntSlider | dyn_t textorfunc | int min | int curr | int max int64_t gui_horizontalSlider | dyn_t textorfunc | double min | double curr | double max int64_t gui_verticalIntSlider | dyn_t textorfunc | int min | int curr | int max int64_t gui_verticalSlider | dyn_t textorfunc | double min | double curr | double max int64_t gui_verticalLayout int64_t gui_horizontalLayout int64_t gui_tableLayout | int num_columns int64_t gui_flowLayout int64_t gui_group | const_char* title int64_t gui_scrollArea | bool scroll_horizontal ? true | bool scroll_vertical ? true | bool listen_to_mouse_wheel ? true int64_t gui_verticalScroll | bool listen_to_mouse_wheel ? true int64_t gui_horizontalScroll | bool listen_to_mouse_wheel ? true int64_t gui_line | const_char* content | const_char* textcolor ? "" # Note, to work around a bug in Qt, the callback will not be called if the line contains the same value as last time when pressing return. int64_t gui_textEdit | const_char* content | bool read_only ? false int64_t gui_ratio | dyn_t ratio | bool wheelMainlyChangesNumerator ? true | bool wheelDecrasesDenominatorIfNumeratorIsOne ? true # Note, to work around a bug in Qt, the callback will not be called if the line contains the same value as last time when pressing return. int64_t gui_text | const_char* text | const_char* color ? "" | bool align_top ? false | bool align_left ? true # 'text' can contain html. int64_t gui_intText | int min | int curr | int max int64_t gui_floatText | double min | double curr | double max | int num_decimals ? 2 | double step_interval ? -1 int64_t gui_web | const_char* url # url can be http url (url must start with "http"), local file with relative path (relative to the radium executable), or local file with absolute path. (Note that absolute paths usually don't work under windows if it contains non-ascii characters.) void gui_setUrl | int64_t gui | const_char* url # Only works if gui is a web. bool gui_webCanShowManual # returns true if the built-in web browser is able to show the manual. void openExternalWebBrowser | const_char* stringurl # accepts same type of arguments as gui_web int64_t gui_fileRequester | const_char* header_text | filepath_t dir ? createIllegalFilepath() | const_char* filetypename ? "" | const_char* postfixes ? "" | bool for_loading ? true | const_char* default_suffix ? "" | bool several_files ? false int64_t gui_fontRequester | const_char* fontdescr ? "" int64_t gui_editor gui_editorLoadFile | int64_t guinum | filepath_t filename gui_editorSetFile | int64_t guinum | filepath_t filename | bool load_if_exists ? true void gui_editorSave | int64_t guinum | filepath_t filename ? createIllegalFilepath() # if filename is set, this is the same as "Save As". void gui_editorFind | int64_t guinum void gui_editorFindNext | int64_t guinum void gui_editorAddTextChangedCallback | int64_t guinum | func_t* callback int64_t gui_bottomBar | bool include_editor_elements | bool include_navigator # tabs int64_t gui_tabs | int tab_pos ? 0 # 0=north,1=south,2=west,3=east int64_t gui_getTabBar | int64_t tabs_guinum # Returns the tab bar. Can be used to paint custom graphics and so forth. void gui_removeTab | int64_t tabs_guinum | int pos int gui_addTab | int64_t tabs_guinum | const_char* name | int64_t tab_guinum | int pos ? -1 # if pos==-1, tab is appended. Function returns pos the tab was inserted at. int gui_currentTab | int64_t tabs_guinum void gui_setCurrentTab | int64_t tabs_guinum | int pos int gui_getTabPos | int64_t tabs_guinum | int64_t tab_guinum # returns negative number if not found (-2 if not included, -1 if error) int gui_numTabs | int64_t tabs_guinum const_char* gui_tabName | int64_t tabs_guinum | int pos ? -1 # splitter int64_t gui_verticalSplitter | bool childrenCollappsible ? false int64_t gui_horizontalSplitter | bool childrenCollappsible ? false int64_t gui_getSplitterHandle | int64_t splitter_guinum | int pos dynvec_t gui_getSplitterSizes | int64_t splitter_guinum void gui_setSplitterSizes | int64_t splitter_guinum | dynvec_t splitter_sizes # rubber band. Doesn't work. Use gui-rubber-band from gui.scm instead. # int64_t gui_rubberBand | float opacity ? 0.0 # table int64_t gui_table | dynvec_t header_names #int64_t gui_addTableCell | int64_t table_guinum | dyn_t cell | int x | int y # cell can either be a guinum or a string. Returns gui num of the cell. int64_t gui_addTableGuiCell | int64_t table_guinum | int64_t cell_gui_num | int x | int y | bool enabled ? true int64_t gui_addTableStringCell | int64_t table_guinum | const_char* string | int x | int y | bool enabled ? true int64_t gui_addTableIntCell | int64_t table_guinum | int64_t num | int x | int y | bool enabled ? true int64_t gui_addTableFloatCell | int64_t table_guinum | double num | int x | int y | bool enabled ? true gui_addTableRows | int64_t table_guinum | int pos | int how_many # how_many can be negative int gui_getNumTableRows | int64_t table_guinum int gui_currTableRow | int64_t table_guinum int gui_getTableRowNum | int64_t table_guinum | int64_t cell_guinum # returns -1 if not found. (no error message if not found) gui_enableTableSorting | int64_t table_guinum | bool do_sort gui_sortTableBy | int64_t table_guinum | int x | bool sort_ascending # 'x' is column number. gui_stretchTable | int64_t table_guinum | int x | bool do_stretch | int size # various operations on guis const_char* gui_className | int64_t guinum # Returns Qt classname. Should not be used for dispatching since api_gui.cpp may change the underlying class. The function should probably only be used debugging and error messages. void gui_setWindowTitle | int64_t guinum | const_char* value | bool name_is_base64 ? false void gui_setToolTip | int64_t guinum | const_char* value void gui_setText | int64_t guinum | const_char* value | const_char* color ? "" void gui_setValue | int64_t guinum | dyn_t value void gui_appendValue | int64_t guinum | dyn_t value dyn_t gui_getValue | int64_t guinum void gui_add | int64_t parentnum | int64_t childnum | int x1_or_stretch ? -1 | int y1 ? -1 | int x2 ? -1 | int y2 ? -1 void gui_replace | int64_t parentnum | int64_t oldchildnum | int64_t newchildnum bool gui_isVisible | int64_t guinum void gui_addVisibilityChangeCallback | int64_t guinum | func_t* func gui_show | int64_t guinum gui_hide | int64_t guinum gui_close | int64_t guinum bool gui_isOpen | int64_t guinum # Sets the parent window for a window. # # 'gui' must be a toplevel window # # Note that ( :add parent child) is not the same as ( :setParent child parent). # This function is just used to know which window the child should be on top of. However, both forms cause the child to # be automatically deleted when the parent is deleted. # # Beware that if a parent closes, all children are closed as well, and letting the closeCallback return false doesn't prevent that. # (doesn't happen if parentgui is -1, -2, or -3) # # returns true if parent was changed bool gui_setParent | int64_t guinum | int64_t parentgui bool gui_removeParent | int64_t guinum int64_t gui_getParentWindow | int64_t guinum # Returns the id of the window that guinum belongs to, or the guinum itself if it is a window. int64_t gui_getParentGui | int64_t guinum # Same as setParent, but also automatically makes sure the widget is a window if it isn't already. bool gui_setAsWindow | int64_t guinum | int64_t parentgui void gui_setModal | int64_t guinum | bool set_modal # if set_modal is true, modality is set to Qt::WindowModal bool gui_isModal | int64_t guinum gui_disableUpdates | int64_t gui # Note that gui_disableUpdates should be put inside a finally clause to ensure a corresponding gui_enableUpdates is called. gui_enableUpdates | int64_t gui int gui_width | int64_t guinum int gui_height | int64_t guinum int gui_getX | int64_t guinum # relative to parent widget int gui_getY | int64_t guinum # relative to parent widget int gui_getGlobalX | int64_t guinum # relative to global screen coordinates int gui_getGlobalY | int64_t guinum # relative to global screen coordinates float gui_getMouseX | int64_t guinum float gui_getMouseY | int64_t guinum void gui_moveToCentreOf | int64_t guinum | int64_t window_to_move_in_centre_of void gui_moveToParentCentre | int64_t guinum # if gui has no parent, move to centre of screen void gui_raise | int64_t guinum # It's unclear when you need to call raise, activate, or setFocus (obtainKeyboardFocus) in Qt. They should fix the API before V6. void gui_activate | int64_t guinum # It's unclear when you need to call raise, activate, or setFocus (obtainKeyboardFocus) in Qt. They should fix the API before V6. void gui_setPos | int64_t guinum | int x | int y # see also gui_moveToParentCentre void gui_setSize | int64_t guinum | int width | int height bool gui_mousePointsMainlyAt | int64_t guinum # Returns true if the mouse pointer is within the borders of the parent window of guinum, and the window is at toplevel. void gui_setFullScreen | int64_t guinum | bool enable ? true # note that a full screen gui is not automatically deleted if the parent is deleted. And it is not deleted when set back to a non-full screen either if the parent was deleted while being full screen. bool gui_isFullScreen | int64_t guinum void gui_setTakesKeyboardFocus | int64_t guinum | bool take_it # Windows takes focus by default. This function only makes a difference if gui is a window. Non-window guis usualy doesn't obtain focus. bool gui_takesKeyboardFocus | int64_t guinum void gui_setBackgroundColor | int64_t guinum | const_char* color const_char* gui_getBackgroundColor | int64_t guinum const_char* generateNewColor | float mix_background ? 1.0 # mix_background must be between 0 and 1. const_char* generateNewBlockColor | float mix_background ? 1.0 # mix_background must be between 0 and 1. const_char* gui_getFont | int64_t guinum void gui_setFont | int64_t guinum | const_char* font void gui_setStyleSheet | int64_t guinum | const_char* stylesheet void gui_setStyleSheetRecursively | int64_t guinum | const_char* stylesheet void gui_setLayoutSpacing | int64_t guinum | int spacing | int left | int top | int right | int bottom gui_addLayoutSpace | int64_t guinum | int width | int height | bool grow_horizontally ? true | bool grow_vertically ? true void gui_setLayoutStretch | int64_t guinum | int64_t childguinum | int stretch # wraps QBoxLayout::setStretchFactor void gui_setSizePolicy | int64_t guinum | bool grow_horizontally | bool grow_vertically void gui_setMinWidth | int64_t guinum | int minwidth void gui_setMinHeight | int64_t guinum | int minheight void gui_setMaxWidth | int64_t guinum | int minwidth void gui_setMaxHeight | int64_t guinum | int minheight void gui_minimizeAsMuchAsPossible | int64_t guinum # tries to set as small void gui_setEnabled | int64_t guinum | bool is_enabled bool gui_isEnabled | int64_t guinum void gui_setStaticToplevelWidget | int64_t guinum | bool add ? true # These guis can be used as parent when calling setParent with argument -3. They can also be used as parent for message windows and other windows in the program. The gui must be a toplevel window, and it can not be deleted or closed while it is marked as a static toplevel widget (it can be hidden though). Note that add=false can only be used in !RELEASE mode. int64_t gui_getMainXSplitter #int64_t gui_getMainYSplitter int64_t gui_getMixerYSplitter int64_t gui_getEditorGui int64_t gui_getSequencerGui int64_t gui_getSequencerFrameGui # returns the frame that the sequencer lives in. int64_t gui_getInstrumentGui int64_t gui_getMainMixerGui int64_t gui_getMainMixerStripsGui #int64_t gui_getMixerStripsGuiWithMousePointerAboveIt # returns -1 if no mixer strips gui currently has mouse pointer above it. #int64_t gui_getMixerStripsGuiWithKeyboardFocus # returns -1 if no mixer strips gui currently has keyboard focus. int64_t gui_getMixerStripsGuiInActiveWindow # returns -1 if no mixer strips gui is in the active window. # Most of the X/X1/X2/Y/Y1/Y2 functions returns a value relative to the top left position of the editor. # These two functions can be used to translate those values relative to 'gui' instead. double gui_getEditorDistanceX | int64_t guinum double gui_getEditorDistanceY | int64_t guinum const_char* getDateString | const_char* date_format ? "yyyy-MM-dd" const_char* getTimeString | const_char* time_format ? "hh:mm:ss" const_char* getTimeStringFromFrames | int64_t num_frames const_char* getHtmlFromText | const_char* text const_char* getTextFromHtml | const_char* html ### drawing # gradient types: # -1: No gradient # 0: HORIZONTAL_DARK_LEFT, # 1: HORIZONTAL_LIGHT_LEFT, # 2: VERTICAL_DARK_TOP, # 3: VERTICAL_LIGHT_TOP, # 4: HORIZONTAL_DARK_SIDES, # 5: HORIZONTAL_LIGHT_SIDES, # 6: VERTICAL_DARK_SIDES, # 7: VERTICAL_LIGHT_SIDES, # 8: DIAGONAL_DARK_UPPER_LEFT, # 9: DIAGONAL_LIGHT_UPPER_LEFT, # 10: DIAGONAL_DARK_UPPER_RIGHT, # 11: DIAGONAL_LIGHT_UPPER_RIGHT, void gui_drawLine | int64_t guinum | const_char* color | float x1 | float y1 | float x2 | float y2 | float width void gui_drawBox | int64_t guinum | const_char* color | float x1 | float y1 | float x2 | float y2 | float width | float round_x ? 5 | float round_y ? 5 void gui_filledBox | int64_t guinum | const_char* color | float x1 | float y1 | float x2 | float y2 | float round_x ? -1 | float round_y ? -1 | int gradient_type ? 3 | float how_much_gradient ? 0.10 void gui_filledPolygon | int64_t guinum | const_char* color | dynvec_t points # points is a flat vector or list with x and y values void gui_drawPolygon | int64_t guinum | const_char* color | dynvec_t points | float width # points is a flat vector or list with x and y values void gui_drawEllipse | int64_t guinum | const_char* color | float x1 | float y1 | float x2 | float y2 | float width void gui_filledEllipse | int64_t guinum | const_char* color | float x1 | float y1 | float x2 | float y2 # the 'rotate' parameter is in degrees (0 -> 360). # If both cut_text_to_fit and scale_font_size are true, the font is first scaled down so that it fits vertically, and then cut so that it fits horizontally. # Returns true if all of the text has been drawn. bool gui_drawText | int64_t guinum | const_char* color | const_char* text | float x1 | float y1 | float x2 | float y2 | bool wrap_lines ? true | bool align_top ? false | bool align_left ? false | int rotate ? 0 | bool cut_text_to_fit ? true | bool scale_font_size ? true | bool text_is_base64 ? false void gui_setPaintOpacity | int64_t guinum | double opacity void gui_drawVerticalText | int64_t guinum | const_char* color | const_char* text | float x1 | float y1 | float x2 | float y2 | bool wrap_lines ? true | bool align_left ? false | bool align_top ? false # same as calling drawText with rotate=90 void gui_drawSvg | int64_t guinum | filepath_t svgfile | float x1 | float y1 | float x2 | float y2 bool gui_areaNeedsPainting | int64_t guinum | float x1 | float y1 | float x2 | float y2 # can only be called from a painter callback. # drag and drop void gui_createBlockDragIcon | int64_t parent | int width | int height | float hotspot_x | float hotspot_y | int blocknum | func_t* paint_icon_callback void gui_createFileDragIcon | int64_t parent | int width | int height | float hotspot_x | float hotspot_y | filepath_t w_path | func_t* paint_icon_callback # obtaining keyboard focus void obtainKeyboardFocus | int64_t guinum ? -1 # Stops keyboard events to be delivered to the editor. Useful if implementing a custom gui. Note that the gui should be modal for this to work properly. You must also be VERY careful to ensure that releaseKeyboardFocus is called when finished. It's also unclear when you need to call raise, activate, or setFocus (obtainKeyboardFocus) in Qt. Sometime you have to call activate as well (although activate seems to be an alternative to raise as well.) Qt should fix the API before V6. void releaseKeyboardFocus # Gives back keyboard to the editor. It must NOT be called unless obtainKeyboardFocus was called first. bool gui_hasKeyboardFocus | int64_t guinum bool gui_isActiveWindow | int64_t guinum # returns true if the parent window of guinum is active. float gui_getGfxScale | float width_or_height | float downscale ? 1.0 # mixer strips informAboutGuiBeingAMixerStrips | int64_t guinum # internal int64_t gui_createMixerStrips | int num_rows ? -1 | dyn_t vert_ratio ? g_uninitialized_dyn | dyn_t instrument_ids ? g_uninitialized_dyn int gui_getNumRowsInMixerStrips| int64_t guinum ? -1 # If -1, use main mixer strips gui void gui_setNumRowsInMixerStrips | int num_rows | int64_t guinum ? -1 # If -1, use main mixer strips gui dyn_t gui_getVertRatioInMixerStrips | int64_t guinum ? -1 # If -1, use main mixer strips gui void gui_setVertRatioInMixerStrips | dyn_t vert_ratio | int64_t guinum ? -1 # If -1, use main mixer strips gui void gui_resetAllMixerStrips dyn_t gui_getMixerStripsConfiguration | int64_t guinum void gui_setMixerStripsConfiguration | int64_t guinum | dyn_t configuration int64_t showMixerStrips | int num_rows ? 1 int64_t showMixerStrips2 | int num_rows ? 1 | dyn_t instrument_ids ? g_uninitialized_dyn int64_t gui_createSingleMixerStrip | instrument_t instrument_id | int width ? 100 | int height ? 600 # modular mixer float getCurrMixerSlotX float getCurrMixerSlotY # utility function. Returns true if two triangles - a and b - intersects. bool trianglesIntersects | float a_x1 | float a_y1 | float a_x2 | float a_y2 | float a_x3 | float a_y3 | float b_x1 | float b_y1 | float b_x2 | float b_y2 | float b_x3 | float b_y3 | bool allowReversed ? true | bool onBoundary ? false