DNA Sequence (Nucleotide) Player: Converting nucleotide sequences to (midi) Music
gene-seq-to-music-via-pd~-help.pd
gene-seq-to-music-via-pd~.pd
DNA Sequence (Nucleotide) Player: Converting nucleotide sequences to (midi) Music
Credits:
All source data is retrieved from the "Nucleotide Database" (DB) via National Center for Biotechnology Information, U.S. National Library of Medicine (NCBI) at
https://www.ncbi.nlm.nih.gov/nucleotide/
Miller Puckette for the J08.classicsynth
and
the creator(?) of the vlist2symbol abstraction.
Requirements:
wget, Linux command line web retrieval tool
Linux
ggee, [shell]
cyclone, [counter]
Use Case:
Actors: those who want to hear the patterns in DNA nucleotide sequences and/or comprehend how Nature makes Music not "noise"/Gene sequences are like one of Nature's "voices"/
Case:
Enter the "Accession" (identification number (id)) of a NCBI DB entry into the id symbol field
Case:
Click on "LOAD"
Case:
Click "PLAY".
Instructions:
1-Go to the DB (https://www.ncbi.nlm.nih.gov/nucleotide/) and find an Accession(id) of a sequence;
2-Enter that value into the ID [symbol] box of the patch
3-Click the "LOAD" [button/bang];
4-Set pitch, velocity, duration, and repeat for G,A,C, and T (representing the four nucleotide bases of a DNA strand — guanine, cytosine, adenine, and thymine);
5-Toggle "PLAY" to 1, i.e. to On, to hear the sequence using the variables you set in 4) and to "0" to stop it.
How It Works:
The patch takes the input ID and packs it into a string as the FILE(Path) for wget.
The wget command is then sent as a list to a shell object.
The output of the shell object is then parsed (using an intermediate [text] object) into a [text] object with each line being 4 characters long, each character being either G,C,A, or T.
Once loaded and Play is clicked, each line is then reconstructed as a midi note with the pitch as determined by the first character, velocity (2nd) and duration (3rd) and repeated as many times as the 4th character dictates (as set in 4) above).
Once the entire sequence is played, the player stops sending notes.
Inlets(left to right):
id, either numbers or symbols
values, a 16 item list of 4x4 sets of pitch, velocity, duration, repeat (i.e. one set per nucleotide type, G,C,A, or T) (Note: the sequence, if loaded, will play immediately upon receipt of this list.)
beats per minute, bpm, esp. as it relates to note durations.
Outlets:
the current midi note, i.e. pitch/velocity/duration
id (of the gene sequence)
sequence name, as listed by the NCBI DB
nucleotide being played as a string, ex. GGAC
AFTERWARD:
-
Since it really is only sending midi value it can be connected to whatever synth you would like;
-
Elsewhere on this Forum, I shared a patch which took "noise" as its input and converted it into music using sigmund~, in that case "running water" as its source. (See for reference: https://forum.pdpatchrepo.info/topic/12108/converting-noise-to-music-rushing-water-using-sigmund) This patch takes that concept and applies it to what might also be called "noise", DNA sequences, were it not that the results (like the running water, yet even more so) sound like "Music".
This exploration has me wondering...
How can we delineate what is noise (only natural at this point) and what is music?
Is the creative/ordering/soulful nature's being expressed in our own music not also being expressed by Nature itself? ...so that we might be considered one "bow" playing upon it?
And, if by Music we mean notes laid down on purpose, might not it be said that is what Nature has been done? Is doing?
I hope you find the patch useful, stimulating, and exciting, or at the very least funny to think about.
Love through Music, no matter in what state Life may find you,
Peace,
Scott
Getting Shelly 1 device to work with PureData and MobMuPlat
Getting Shelly 1 device to work with PureData and MobMuPlat
Here's the Pd along with a picture attached of how to get the Shelly 1 to be turned on using Pd Vanilla. Here's a link to the product https://shelly.cloud/shelly1-open-source/ . You could also use mrpeach which would make it easier but I could only use Pd Vanilla.
All credit goes to the people on the Pd List IOhannes m zmölnig, Jack, Mrpeach, the Shelly 1 facebook forum and a host of others
The Pd for turning on and off a couple of Shelly 1's which are connected to a musical Tesla coil, a pump, and a ultrasonic mister.
I'll be using MobMuPlat to control all of this from my tablet this will allow my laptop to do all the CPU sound generating intensive stuff. Someone made a good tutorial that explains this links below.
I'll place the completed project on (at the moment the first test version is up but I'll be putting a different design up next )
https://stillpointx.wordpress.com/research/modulated-plasma/
Here's the pd file
test_netsend_shelly1_on_off_toggle.pd
[Solved] Only have one instance of Pd open on RPi...
Hi,
I am using a python script to open Pd files on a Raspberry Pi. I am having an issue because I using shell commands to open Pure Data and when I want to open a new patch it always opens a new instance of Pd. Is there any way to have Pd only run in one instance? Is there a message I can give it? or a flag or something?
EDIT: here's a better way of asking my question. Is there a shell command I can use to open a .pd file in an already open instance of Pure Data? That's really what's hanging me up.
Thank you in advance for any help.
Nick
Purr Data 2.5.0
@alfonso.santimone said:
@jancsika Yeah! that's true. So installed and working correctly at least with simple MIDI and audio test. Portaudio ASIO working. Now i'll check some external helpfile.
So i guess the only things to work on various Makefiles are
- some path adjusting
- some file name adjusting
- correct target architecture
- invoke correct .dll libraries
- Solve Gem issues not compiling for Win64
- Solve fluidsynth~ issues not compiling for Win64
Now that it is compiling and installing, would you mind wrapping up all the changes you made here to get it to build and submitting either
- a merge request on git.purrdata.net, or
- opening an issue here:
https://git.purrdata.net/jwilkes/purr-data/issues
Again, I just need to know the changes you made to get it into a working state.
Once these changes are merged we should be able to at least do a "light" build. Then we can focus on getting the rest of the libraries working, the midi issue, etc.
Camomile v1.0.1 - An audio plugin with Pure Data embedded
The brand new Camomile release (1.0.1) is available!
Camomile is a plugin with Pure Data embedded that offers to load and to control patches inside a digital audio workstation. The plugin is available in the VST2, VST3 and Audio Unit formats for Linux, Windows and MacOS. Download and information on the website: https://github.com/pierreguillot/camomile/wiki.
Read carefully the documentation. Feedback are more than welcome!
For feature request and bug report, please use the issue section on the Github repository if you can:
https://github.com/pierreguillot/camomile/issues.
An overview of the main changes:
v1.0.0
- Use libpd instead of my personal wrapper.
- Use TLS approach of Pd to manage thread concurrency issues.
- Use a text file to define the properties of the plugins.
- Generate plugins with the patches included.
- Separate the GUI and the parameters' definitions.
v1.0.1
- Fix thread concurrency issue that occurred when selecting a program (#77).
- Fix stack overflow issue due to concurrent access to the Pd's stack counter (#69).
- Update documentation for VST2/VST3/AU generation on MacOS to display the name of the plugins in Ableton (#75).
- Improve the whole documentation (#72) and start "How to Create Patches" (#73).
- Add more warning when there are extra arguments in parameters' methods.
- Add support for "openpanel" and "savepanel" methods.
- Update examples Bulgroz, AlmondOrgan, Castafiore, MiniMock.
- Start/Add support for patch description in the text file (#74).
- Start/Add support for patch credits in the text file (#74).
Further information on the previous versions and the changes on this topic.
digital artifacts when using the shell object
Hello all,
I writing a patch that uses a simple shell Applescript app I made that closes a pdf file and opens a new pdf file in Preview mode on an Apple.
When the pd switches to the Applescript to close and then open pdfs, there is a digital click and pause in the smooth running of the program. Because this is obviously undesirable, I am wondering if I can do something to alleviate this problem.
Is it the Shell command?
Is it the nature of using Shell?
Is it that the computer leaves pd as the active window for a brief moment?
Is it that Preview is closed then opened again?
I can add the patch I created if that is needed to get to the bottom of this, but am wondering if there are any quick fixes to expand the dedication of the CPU to pd to avoid digital artifacts in performance.
Shell object, maybe bugged
Does any command work in the [shell] object that you are using? If you run something simple, like 'ls' or 'pwd' will it output the file list of the directory? If so, then there could likely be a formating issue with the text that you are sending to the object. The way that puredata handles sending certain symbols and characters through messages can sometimes throw a command askew when translating to bash. To make things harder, the front slash that is typically used as an escape symbol to send symbols as literals is not allowed in messages within pd... So if the [shell] object is functional, but your particular command just doesn't seem to want to work properly, then you can try the following:
1 - make use of objects that convert text in messages to and from symbols, like [makesymbol] [cyclone/tosymbol] [cyclone/fromsymbol] [s2l] [l2s] etc.
2 - try sending commands to shell via [text] or [coll].
3- when all else fails, or a script is just too complex or uses many odd characters, open a code editor like kate (or textmate on mac,) and type the code in there. Try running it in a terminal to make sure it works. Save the file, and then in terminal run
sudo chmod +x "/path/to/file/filename"
enter your password and now that file will be marked by the OS as executable. You can call it from the [shell] object by simply sending it the path to the file, or cd <path>; ./<filename>
If your script requires variables that change in pd, like $1 $2, then you can set that up in your script by defining variables and then sending those values as in separate messages. for example, in your code, you could start by defining a variable like
foo=0;
then in pd
[nbx]
|
[foo=$1(
|
[shell]
After you send the change in value to the variable, call the script again and it will output with the updated values.
In sticky situations in shell, this trick has saved the day for me many times. Hope that helps.
Audio Ideas (AI) Collection (placeholder, currently only links)-effects, controllers, mmp, etc.
Audio Ideas (AI) Collection (placeholder) currently only links
per @LiamG 's kind suggestion I have begun the process of consolidating my abs and patches, etc. into a single location/zip file or for possible upload to github.
Just to get the ball/me rolling and scope the work I got the links for my shares into a single location to later be consolidated into the single AI Collection.
For now at least, please, bare with me (and the links below) as ideas I am more passionate about currently are demanding my attention. (Which funnily enough will probably also be included in the set, where ever they are shared.)
Thanks, for your patience and all you do for the Pure Data Family.
Sincerely,
Scott
abstract~
pushdelay-envelope-env-driven-delay-line-with-both-delay-time-and-feedback-dependent
numpad-abstraction-for-entry-of-large-numbers-via-click-instead-of-sliders-includes-basic-calculator
abs_delay_fbw-feedbackwards-lifo-last-in-first-out-delay
abs_sequences_by_formula-sequences-by-formula-abstraction-ex-collatz
abs_effects_router-60-effects-in-one-abstraction-router-from-diy2-stamp-album-my-abs
visualcontrolsurface-vsl-values-set-by-their-location-on-the-screen-req-ggee-shell
abs_4-8-14_way_toggle-pair-2-toggles-resulting-in-4-8-or-14-states
audioflow-delay-to-forward-backward-looper-using-speed-control
5-band-equalizer-with-bezier-controller-eq5_mey_w_bezier_sv-pd-updated-to-8-band-below
forward-backward-looper-orig-abs-from-residuum-whale-av
abs_rgb2hex-rgb-0-255-colors-to-hexadecimal-values
pseudo-12-string-effect-6-string-guitar-to-sound-like-a-12-string
jack_midi2pd_2sys_connector_sv-jack-midi_out-to-pd-sys_playback-switcher
abs_4to16pads_bin_conv_sv-convert-4-midi-pads-from-a-binary-value-to-a-decimal-for-rerouting
abs_automatedslider_sv-automated-control-changer-pd-and-mobmuplat-editor-versions
idea-for-effects-stack-ing-technique-control-mother
micin-_abs-abstraction-convert-signal-to-notein-ex-using-a-midi-synth-as-a-guitar-pedal
curve_abs-tri-way-curve-switch-to-change-control-values-in-either-linearly-convex-or-concave-manner
a-preset-control-abstraction-for-saving-parameters-presets-to-text-files
4-tap-delay-with-pitch-shifter-per-delay-line-adaptation-of-diy2-patches
patch~
extra
the-15-owl-faust-patches-compiled-as-32bit-linux-externals-attached
libpd
mmponboardeditortemplate-mmp-for-creation-of-mobmuplat-files-directly-on-the-handheld-android-only
3d-synth-webpd-tree-js-webgl_camera_cinematic-html-example
Off topic
Purr Data finally released
Purr Data is finally released!
Purr Data inherits the goodness of Pd-l2ork and runs on Gnu/Linux, Windows, and OSX. Infinite undo, enhanced editing and 2d drawing, and most of the the externals from Pd-extended (plus more from Pd-l2ork).
[Edit]
2.2.4:
- fix
[wrap~]
inconsistency - port mouse events from
[hcs/cursor]
- fix bug with dollarsigns in struct names
- add some "legacy_mouse" classes to support externals that report mouse events: "legacy_mousemotion", "legacy_mouseclick" and "legacy_mousewheel"
- fix bug loading default libs on OSX
2.2.3:
- fixed overallocation bug that made loading soundfiles into arrays take up unnecessary amount of memory (4x-8x overallocation)
- fix some utf8 string handling routines
- port fixes for
[soundfiler]
from Pd Vanilla - fix bug with "$@" that could cause invalid reads in some cases
- fix
[initbang]
functionality - fix crasher in
[pdinfo]
New in 2.2.2:
- fixed usability issues with the dropdown object
New in 2.2.1:
- fix stray GUI bugs
- fix some external libs that weren't building under Windows
- fix some OSX key event bugs
New in 2.2.0:
- fix GOP sizing algo to accommodate small GOP abstractions
- turn off anoying Gnome-keyring popup that appears on some systems
- bump nw.js GUI toolkit to 0.22.1
- fix arrow-key navigation-- use arrow keys for scrollbar navigation in runmode, turn off in editmode
- ignore iemgui label in bbox computation for "-legacy" mode
- fix OSCx library on arm builds
- guard against more out-of-order messages from Pd to GUI
- clean up and simplify build instructions
- leave enough space in GOP abstractions to accommodate all xlets
- fix search path bug
- update some of the documentation, removing old "messageoddness" patches that no longer apply to Purr Data
- update unauthorized library
- clean up and simplify the repository code/structure
New in 2.1.2:
- minor bugfix in the console (duplicate messages weren't printed after clearing)
- some minor fixes in the default startup configuration
- some cosmetic changes in the accompanying README and license information
- various bugfixes in objects and internal API functions (message boxes, dropdown atom, loadbang-related issues)
- updated lyonpotpourri to the latest 3.0 version to fix various 64 bit issues on Linux and macOS
- saving the preferences is much faster on the Mac now
- new animated "About Pd-L2ork" popup; also, the proper version is now shown in the generic "About" box on the Mac
New in 2.1.1:
- normalized range for
[bendin]
(keep old behavior under legacy flag) - added "mouseenter" and "mouseleave" events for data structures
- fixed "Recent Files" under Windows
- cleaned up documentation in repo
- fix for
[midiclkin]
(#255) - added "l2ork_version" message for
[pdinfo]
- make loader search order the same as Pd Vanilla
- fixed cord inspector font size
- silence spurious error when autopatching a signal object
- added a
[dropdown]
object for choosing a value for an atom box (interface not stable yet) - made gatom resizable by click-dragging in edit mode
- added "<ctrl-mousewheel>" for zooming
- added solarized and inverted solarized gui presets
- fixed mycanvas stroke color updates
- improvements to mode 4 of intelligent patching
- fixed "<Delete>" not deleting a selected object on some systems
New since rc5:
- fixed display bug with [vu] on graph-on-parent canvas
- fix documentation for timer-help.pd
- fix "open" method for [ggee/image]
- default to the user's home directory on OSX app bundle
- open the help browser file browser in the doc folder
- add a canvas "Print" menu item (under "File" menu)
- allow option to save the zoom level with the canvas
- fix a data structure crasher
please report lots of bugs to
https://git.purrdata.net/jwilkes/purr-data/issues
Binaries:
Pd-l2ork on AVLinux 2016???
I'm only starting to deal with AVL2016 myself -- it's a completely new platform for Glen & the gang and there are still a few issues they have to work out with it before it will be up to par with previous releases. This is why I still haven't deleted my "Diehard" install (still good for audio/midi).
I can say that with "Diehard" and the other previous Debian Squash AVLs Vanilla always compiled, installed and worked without a hitch. I never installed L2ork in AVL (I have a Ubuntu/KX Studio partition for that and I'm mostly into Vanilla anyway) but others on this forum had no trouble with it after replacing the jack module. Neither Pd version was affected by the absence of Pulse Audio.
As I see it, the options for AVL2016 and Pd are this right now:
--Vanilla: Now includes the deken extension finder as standard, so adding all the libraries you need from Extended is much easier. Problem so far: I tried both compilers in 2016 and still get failed graphics renderings (i.e. gui bangs show up as blank boxes etc). Automatic loading of the system font does not work and I can't fix the issue with any of the font startup flags. This causes tightly-spaced patches to get messed up. There is another Sid-based multimedia distro -- i/o linux -- that has the latest Vanilla release in the repos. On i/o linux the graphical errors are not present, but the font issues are the same. I have not yet tried installing that repo package to see if gives the same result on AVL 2016.
--L2ork: Options as described in my last post OR you could also try the new PurrData version that is replacing it soon. It's not quite ready yet, but close. It is possible that the graphics issues are related to the outdated GUI and since the point of PurrData is to replace this, it may be a way to get past those issues. There's posts on here with links to the RC4 PurrData test release, thou you may have to compile it as I don't see any pre-compiled versions for Sid.. There is still the issue of the jack dependencies.
Let me know how you make out as we are in the same boat at the moment.