MCPcopy Create free account

hub / github.com/alisomay/libpd-rs / functions

Functions254 in github.com/alisomay/libpd-rs

↓ 34 callersMethodas_ptr
Get the raw pointer to the internal pd instance. From this point on you're responsible for managing the instance's lifetime. If you are not sure abo
src/instance.rs:141
↓ 26 callersFunctionblock_size
()
src/functions.rs:673
↓ 24 callersFunctionopen_patch
Opens a pd patch. The argument should be an absolute path to the patch file. It would be useful to keep the return value of this function. It can be
src/functions.rs:523
↓ 21 callersFunctionclose_patch
Closes a pd patch which has opened before. Handle needs to point to a valid opened patch file. # Examples ```no_run use std::path::PathBuf; use libp
src/functions.rs:618
↓ 19 callersMethodset_as_current
Set this instance as the current active instance for the thread.
src/lib.rs:676
↓ 18 callersMethodaudio_context
Creates an audio context for this instance to be easily passed in to the audio thread.
src/lib.rs:669
↓ 18 callersFunctiondsp_on
Activates audio in pd. # Errors A list of errors that can occur: - [`SendError`](crate::error::SendError) - [`MissingDestination`](crate::error::Sen
src/functions.rs:732
↓ 18 callersMethodprocess_float
Sets the instance as the current one and calls [`process_float`](crate::functions::process::process_float).
src/lib.rs:1104
↓ 13 callersMethodset_as_active_instance
Sets this instance as the active instance for the thread until the returned guard is dropped. If the guard is dropped, the previously active instance
src/lib.rs:702
↓ 11 callersMethodas_mut_ptr
(&self)
src/types.rs:11
↓ 11 callersFunctionstart_listening_from
Subscribes to messages sent to a receiver in the loaded pd patch `start_listening_from("foo")` would add a **virtual** `|r foo|` which would forward
src/functions/receive.rs:78
↓ 11 callersFunctionstop_listening_from
Unsubscribes from messages sent to the receiver in the loaded pd patch `stop_listening_from("foo")` would **remove** the virtual `|r foo|`. Then, me
src/functions/receive.rs:109
↓ 9 callersFunctionarray_size
Gets the size of an array by its name from the pd patch which is loaded. # Example ```no_run use libpd_rs::functions::array::array_size; let size =
src/functions/array.rs:19
↓ 9 callersFunctioninit
Initializes libpd. Initializes the currently set pd instance for the thread also initializes ring buffers for internal message passing. Call this fun
src/functions.rs:427
↓ 9 callersMethodreceive_midi_messages_from_pd
Sets the instance as the current one and calls [`receive_midi_messages_from_pd`](crate::functions::receive::receive_midi_messages_from_pd).
src/lib.rs:1098
↓ 9 callersMethodto_t_atom
Converts a Rust `Atom` to a C `t_atom`. For symbols, this function requires a current libpd instance to be set. # Errors A list of errors that can
src/atom.rs:30
↓ 7 callersMethodactivate_audio
Activates or deactivates audio in pd. # Errors A list of errors that can occur: - [`SendError`](crate::error::SendError) - [`MissingDestination`](cr
src/lib.rs:1029
↓ 6 callersFunctionadd_double_to_started_message
Adds an `f64` to the current message in the progress of composition # Example ```rust use libpd_rs::functions::send::{start_message, add_double_to_st
src/functions/send.rs:223
↓ 6 callersFunctioninitialize_audio
Initializes audio rendering This doesn't mean that the audio is actually playing. To start audio processing please call [`dsp_on`](crate::util::dsp_o
src/functions.rs:686
↓ 6 callersMethodreceive_messages_from_pd
Sets the instance as the current one and calls [`receive_messages_from_pd`](crate::functions::receive::receive_messages_from_pd).
src/lib.rs:1092
↓ 6 callersFunctionstart_message
Start composition of a new list or typed message of up to max **element** length Messages can be of a smaller length as max length is only an upper b
src/functions/send.rs:168
↓ 5 callersFunctionfinish_message_as_typed_message_and_send_to
Finishes the current message and send as a typed message to a receiver in the loaded pd patch Typed message handling currently only supports up to `4
src/functions/send.rs:330
↓ 5 callersFunctionread_double_array_from
Reads a named array from pd to a mutable slice of `f64`. Reads values as much as `source_read_amount` from the array which is specified with the `sou
src/functions/array.rs:226
↓ 5 callersFunctionread_float_array_from
Reads a named array from pd to a mutable slice of `f32`. Reads values as much as `source_read_amount` from the array which is specified with the `sou
src/functions/array.rs:117
↓ 5 callersFunctionresize_array
Resizes an array found by its name from the pd patch which is loaded. Sizes `<= 0` or `> size limit` are clipped to `1` # Example ```no_run use libp
src/functions/array.rs:53
↓ 4 callersFunctionadd_to_search_paths
Adds a path to the list of paths where pd searches in. Relative paths are relative to the current working directory. Unlike the desktop pd applicati
src/functions.rs:480
↓ 4 callersMethodclose_patch
Closes a pd patch for this instance. # Errors A list of errors that can occur: - [`PatchLifeCycleError`](crate::error::PatchLifeCycleError) - [`Fail
src/lib.rs:770
↓ 4 callersFunctionmake_atom_list_from_t_atom_list
Convenience function to convert a list of `t_atom`s to a list of `Atom`s. This function will ignore any `t_atom`s that cannot be converted to `Atom`.
src/atom.rs:169
↓ 4 callersFunctionmake_t_atom_list_from_atom_list
Convenience function to convert a list of `Atom`s to a list of `t_atom`s. # Errors A list of errors that can occur: - [`NoCurrentInstanceSet`](crate
src/atom.rs:162
↓ 4 callersMethodsample_rate
(&self)
src/lib.rs:1051
↓ 4 callersFunctionsend_float_to
Sends an `f32` value to the pd receiver object specified in the `receiver` argument `send_float_to("foo", 1.0)` will send the `f32` value to `|s foo|
src/functions/send.rs:64
↓ 4 callersFunctionwrite_double_array_to
Writes a slice of `f64` to a pd named array. Reads values as much as `read_amount` from the array which is given as the `source` argument and writes
src/functions/array.rs:278
↓ 4 callersFunctionwrite_float_array_to
Writes a slice of `f32` to a pd named array. Reads values as much as `read_amount` from the array which is given as the `source` argument and writes
src/functions/array.rs:169
↓ 3 callersFunctioncalculate_ticks
(channels: i32, buffer_size: i32)
src/functions.rs:764
↓ 3 callersFunctionfinish_message_as_list_and_send_to
Finishes the current message and send as a list to a receiver in the loaded pd patch The following example will send a list `42.0 bar` to `|s foo|` o
src/functions/send.rs:290
↓ 3 callersMethodgain
(&mut self, value: f32)
examples/with_nannou/bubble.rs:151
↓ 3 callersFunctionget_dollar_zero
Gets the `$0` of the running patch. `$0` id in pd could be thought as a auto generated unique identifier number for the patch. # Errors A list of e
src/functions.rs:638
↓ 3 callersFunctionon_midi_byte
Sets a closure to be called when a single raw MIDI byte is received. You do not need to register this listener explicitly. Port is zero-indexed and
src/functions/receive.rs:778
↓ 3 callersMethodopen_patch
Opens a pd patch for this instance. The argument should be an absolute path to the patch file. Absolute and relative paths are supported. Relative pa
src/lib.rs:802
↓ 3 callersFunctionsend_double_to
Sends an `f64` value to the pd receiver object specified in the `receiver` argument `send_double_to("foo", 1.0)` will send the `f64` value to `|s foo
src/functions/send.rs:97
↓ 3 callersFunctionsend_list_to
Sends a list to a receiver in the loaded pd patch The following example will send a list `42.0 bar` to `|s foo|` on the next tick. The list can be r
src/functions/send.rs:377
↓ 3 callersFunctionverbose_print_state
Sets the flag for the functionality of verbose printing to the pd console
src/functions.rs:700
↓ 3 callersFunctionverbose_print_state_active
()
src/functions.rs:710
↓ 2 callersFunctionadd_float_to_started_message
Adds an `f32` to the current message in the progress of composition # Example ```rust use libpd_rs::functions::send::{start_message, add_float_to_sta
src/functions/send.rs:197
↓ 2 callersFunctionadd_symbol_to_started_message
Adds a symbol to the current message in the progress of composition # Example ```rust use libpd_rs::functions::send::{start_message, add_symbol_to_st
src/functions/send.rs:253
↓ 2 callersFunctionclear_search_paths
Clears all the paths where libpd searches for patches and assets. Initializing an instance also clears the search paths.
src/functions.rs:463
↓ 2 callersMethodeval_patch
Evaluate a string as a pd patch for this instance. This function creates a temporary file with the contents passed behind the scenes. and saves it in
src/lib.rs:847
↓ 2 callersMethodfilter_freq
(&mut self, value: f32)
examples/with_nannou/bubble.rs:157
↓ 2 callersMethodfilter_q
(&mut self, value: f32)
examples/with_nannou/bubble.rs:160
↓ 2 callersMethodinto_inner
(self)
src/types.rs:15
↓ 2 callersMethodinto_iter
(self)
examples/with_nannou/bubble.rs:54
↓ 2 callersFunctionon_float
Sets a closure to be called when an `f32` is received from a subscribed receiver You may either have [`on_double`] registered or [`on_float`] registe
src/functions/receive.rs:246
↓ 2 callersFunctionpoll_gui
Manually updates and handles any GUI messages This is called automatically when running any process function in the library. e.g. [`process_float`](c
src/functions/gui.rs:70
↓ 2 callersFunctionprocess_double
Processes the audio buffer of `f64` in place through the loaded pd patch. The processing order is like the following, `input_buffer -> libpd -> outpu
src/functions/process.rs:126
↓ 2 callersFunctionprocess_float
Processes the audio buffer of `f32` in place through the loaded pd patch. The processing order is like the following, `input_buffer -> libpd -> outpu
src/functions/process.rs:37
↓ 2 callersFunctionprocess_raw
Processes the **non-interleaved** `f32` audio buffer in place through the loaded pd patch. The processing order is like the following, `input_buffer
src/functions/process.rs:164
↓ 2 callersFunctionprocess_raw_double
Processes the **non-interleaved** `f64` audio buffer in place through the loaded pd patch. The processing order is like the following, `input_buffer
src/functions/process.rs:245
↓ 2 callersFunctionprocess_raw_short
Processes the **non-interleaved** `i16` audio buffer in place through the loaded pd patch. The processing order is like the following, `input_buffer
src/functions/process.rs:207
↓ 2 callersFunctionprocess_short
Processes the audio buffer of `i16` in place through the loaded pd patch. The processing order is like the following, `input_buffer -> libpd -> outpu
src/functions/process.rs:84
↓ 2 callersFunctionreceive_messages_from_pd
Receives messages from pd message queue. This should be called repeatedly in the **application's main loop** or the **audio callback** to fetch messa
src/functions/receive.rs:521
↓ 2 callersMethodrelease_time
(&mut self, value: f32)
examples/with_nannou/bubble.rs:172
↓ 2 callersMethodreverb_size
(&mut self, value: f32)
examples/with_nannou/bubble.rs:175
↓ 2 callersFunctionstart_gui
Opens the current patch within a pd vanilla GUI This function requires that there is a valid pd installation in your computer and a path to pd's main
src/functions/gui.rs:29
↓ 2 callersFunctionstop_gui
Stops the current running pd vanilla GUI if it is running.
src/functions/gui.rs:44
↓ 2 callersMethodunsubscribe_from
Stops listening messages from a source. # Examples ```no_run use libpd_rs::Pd; let mut pd = Pd::init_and_configure(1, 2, 44100).unwrap(); pd.open_pa
src/lib.rs:941
↓ 1 callersMethodadd_path_to_search_paths
Adds a path to the list of paths where this instance searches in. Relative paths are relative to the current working directory. Unlike the desktop pd
src/lib.rs:722
↓ 1 callersMethodadd_paths_to_search_paths
Adds many paths to the list of paths where this instance searches in. Relative paths are relative to the current working directory. Unlike the deskto
src/lib.rs:742
↓ 1 callersMethodadd_to_frame
We draw here
examples/with_nannou/bubble.rs:311
↓ 1 callersMethodclear_all_search_paths
Clears all the paths where this instance searches for patches and assets.
src/lib.rs:757
↓ 1 callersFunctiondsp_off
De-activates audio in pd. # Errors A list of errors that can occur: - [`SendError`](crate::error::SendError) - [`MissingDestination`](crate::error::
src/functions.rs:750
↓ 1 callersFunctioninstance_count
Gets the number of instances of Pd registered. Since the main instance can not be freed after creation, the count will always be at least 1 after the
src/instance.rs:289
↓ 1 callersMethodinstance_number
(&mut self, value: usize)
examples/with_nannou/bubble.rs:187
↓ 1 callersMethodis_current_instance
Checks if this instance is the current active instance for the thread.
src/lib.rs:693
↓ 1 callersMethodis_main_instance
Checks if this instance is the main instance. The main instance is the first instance created. The main instance is always valid.
src/instance.rs:178
↓ 1 callersMethodmake_bubbles
Make bubbles!
examples/with_nannou/main.rs:129
↓ 1 callersMethodnumber
Gets the instance number of this instance. Returns `pd_instanceno`.
src/instance.rs:155
↓ 1 callersFunctionon_bang
Sets a closure to be called when a bang is received from a subscribed receiver Note: Do not register this listener while pd DSP is running. # Exampl
src/functions/receive.rs:204
↓ 1 callersFunctionon_double
Sets a closure to be called when an `f64` is received from a subscribed receiver You may either have [`on_double`] registered or [`on_float`] registe
src/functions/receive.rs:290
↓ 1 callersFunctionon_list
Sets a closure to be called when a list is received from a subscribed receiver Note: Do not register this listener while pd DSP is running. # Exampl
src/functions/receive.rs:394
↓ 1 callersFunctionon_message
Sets a closure to be called when a typed message is received from a subscribed receiver In a message like `[; foo hello 1.0 merhaba]` which is sent f
src/functions/receive.rs:465
↓ 1 callersFunctionon_midi_after_touch
Sets a closure to be called when a MIDI after touch event is received. You do not need to register this listener explicitly. Channel is zero-indexed
src/functions/receive.rs:705
↓ 1 callersFunctionon_midi_control_change
Sets a closure to be called when a MIDI control change event is received. You do not need to register this listener explicitly. Channel is zero-inde
src/functions/receive.rs:590
↓ 1 callersFunctionon_midi_note_on
Sets a closure to be called when a MIDI note on event is received. You do not need to register this listener explicitly. Channel is zero-indexed, pi
src/functions/receive.rs:552
↓ 1 callersFunctionon_midi_pitch_bend
Sets a closure to be called when a MIDI pitch bend event is received. You do not need to register this listener explicitly. Channel is zero-indexed,
src/functions/receive.rs:668
↓ 1 callersFunctionon_midi_poly_after_touch
Sets a closure to be called when a MIDI poly after touch event is received. You do not need to register this listener explicitly. Channel is zero-in
src/functions/receive.rs:742
↓ 1 callersFunctionon_midi_program_change
Sets a closure to be called when a MIDI program change event is received. You do not need to register this listener explicitly. Channel is zero-inde
src/functions/receive.rs:629
↓ 1 callersFunctionon_print
Sets a closure to be called when a message is written to the pd console. There is also no prior call to `start_listening_from` to listen from pd cons
src/functions/receive.rs:161
↓ 1 callersMethodosc_freq
(&mut self, value: f32)
examples/with_nannou/bubble.rs:154
↓ 1 callersMethodoutput_channels
(&self)
src/lib.rs:1075
↓ 1 callersMethodpack_message
Transforms the voice message of the bubble to send to pure data.
examples/with_nannou/bubble.rs:143
↓ 1 callersFunctionreceive_midi_messages_from_pd
Receives messages from pd midi message queue. This should be called repeatedly in the **application's main loop** or the **audio callback** to fetch
src/functions/receive.rs:811
↓ 1 callersFunctionrelease_internal_queues
Frees the internal queued ring buffers. This function needs to be called after you're done with the pd instance before freeing it. Using [`PdInstanc
src/functions.rs:454
↓ 1 callersMethodreverb_wet
(&mut self, value: f32)
examples/with_nannou/bubble.rs:178
↓ 1 callersFunctionsend_after_touch
Sends a MIDI after touch message to `|touchin|` objects in pd. Channel is zero-indexed, value is `0-127`. Channels encode MIDI ports via: `libpd_cha
src/functions/send.rs:632
↓ 1 callersFunctionsend_bang_to
Sends a `bang` to the pd receiver object specified in `receiver` the argument `send_bang_to("foo")` will send a bang to `|s foo|` on the next tick.
src/functions/send.rs:31
↓ 1 callersFunctionsend_control_change
Sends a MIDI control change message to `ctlin` objects in pd. Channel is zero-indexed, controller is `0-127` and value is `0-127`. Channels encode M
src/functions/send.rs:525
↓ 1 callersFunctionsend_message_to
Sends a typed message to a receiver in the loaded pd patch The following example will send a typed message `dsp 1` to the receiver `pd` on the next t
src/functions/send.rs:433
↓ 1 callersFunctionsend_midi_byte
Sends a raw MIDI byte to `|midiin|` objects in pd. Port is zero-indexed and byte is `0-255` # Example ```rust use libpd_rs::functions::send::{send_m
src/functions/send.rs:700
↓ 1 callersFunctionsend_note_on
Sends a MIDI note on message to `|notein|` objects in pd. Channel is zero-indexed, pitch is `0-127` and velocity is `0-127`. Channels encode MIDI po
src/functions/send.rs:490
↓ 1 callersFunctionsend_pitch_bend
Sends a MIDI pitch bend message to `|bendin|` objects in pd. Channel is zero-indexed, value is `-8192 to 8192`. Channels encode MIDI ports via: `lib
src/functions/send.rs:597
next →1–100 of 254, ranked by callers