Package: tabr 0.5.1
Matthew Leonawicz
tabr: Music Notation Syntax, Manipulation, Analysis and Transcription in R
Provides a music notation syntax and a collection of music programming functions for generating, manipulating, organizing, and analyzing musical information in R. Music syntax can be entered directly in character strings, for example to quickly transcribe short pieces of music. The package contains functions for directly performing various mathematical, logical and organizational operations and musical transformations on special object classes that facilitate working with music data and notation. The same music data can be organized in tidy data frames for a familiar and powerful approach to the analysis of large amounts of structured music data. Functions are available for mapping seamlessly between these formats and their representations of musical information. The package also provides an API to 'LilyPond' (<https://lilypond.org/>) for transcribing musical representations in R into tablature ("tabs") and sheet music. 'LilyPond' is open source music engraving software for generating high quality sheet music based on markup syntax. The package generates 'LilyPond' files from R code and can pass them to the 'LilyPond' command line interface to be rendered into sheet music PDF files or inserted into R markdown documents. The package offers nominal MIDI file output support in conjunction with rendering sheet music. The package can read MIDI files and attempts to structure the MIDI data to integrate as best as possible with the data structures and functionality found throughout the package.
Authors:
tabr_0.5.1.tar.gz
tabr_0.5.1.zip(r-4.5)tabr_0.5.1.zip(r-4.4)tabr_0.5.1.zip(r-4.3)
tabr_0.5.1.tgz(r-4.4-any)tabr_0.5.1.tgz(r-4.3-any)
tabr_0.5.1.tar.gz(r-4.5-noble)tabr_0.5.1.tar.gz(r-4.4-noble)
tabr_0.5.1.tgz(r-4.4-emscripten)tabr_0.5.1.tgz(r-4.3-emscripten)
tabr.pdf |tabr.html✨
tabr/json (API)
NEWS
# Install 'tabr' in R: |
install.packages('tabr', repos = c('https://leonawicz.r-universe.dev', 'https://cloud.r-project.org')) |
Bug tracker:https://github.com/leonawicz/tabr/issues
- articulations - Single note articulations and syntax
- guitarChords - Predefined guitar chords
- mainIntervals - Main musical intervals
- tabrSyntax - Tabr syntax
- tunings - Predefined instrument tunings
guitar-tablaturelilypondlilypond-apimusic-analysismusic-datamusic-notationmusic-programmingmusic-syntaxmusic-transcriptionsheet-music
Last updated 2 months agofrom:ed3a06ce2b. Checks:OK: 7. Indexed: yes.
Target | Result | Date |
---|---|---|
Doc / Vignettes | OK | Nov 10 2024 |
R-4.5-win | OK | Nov 10 2024 |
R-4.5-linux | OK | Nov 10 2024 |
R-4.4-win | OK | Nov 10 2024 |
R-4.4-mac | OK | Nov 10 2024 |
R-4.3-win | OK | Nov 10 2024 |
R-4.3-mac | OK | Nov 10 2024 |
Exports:accidental_typeas_integer_octavesas_lyricsas_musicas_music_dfas_noteinfoas_noteworthyas_phraseas_space_timeas_tick_octavesas_vector_timebpmcents_to_ratiochord_11chord_13chord_5chord_7s11chord_7s5chord_7s9chord_add9chord_arpeggiatechord_augchord_breakchord_defchord_degreechord_dimchord_dim7chord_dom7chord_dom9chord_freqchord_invertchord_is_majorchord_is_minorchord_m7b5chord_madd9chord_majchord_maj11chord_maj13chord_maj6chord_maj7chord_maj7s11chord_maj9chord_minchord_min11chord_min13chord_min6chord_min7chord_min9chord_orderchord_rankchord_rootchord_semitoneschord_setchord_sizechord_slicechord_sortchord_sus2chord_sus4chord_topdistinct_notesdistinct_octavesdistinct_pitchesduration_to_ticksdyadflatten_sharpfreq_pitchfreq_ratiofreq_semitonesfrom_chorrrdsfrom_music21gc_fretboardgc_infogc_is_knowngc_name_modgc_name_rootgc_name_splitgc_notesgc_notes_to_fbhpinfo_annotationinfo_articulationinfo_bendinfo_dottedinfo_double_dottedinfo_durationinfo_single_dottedinfo_slideinfo_slur_offinfo_slur_oninformableinterval_semitonesis_chordis_diatonicis_in_scaleis_lyricsis_modeis_musicis_noteis_noteinfois_noteworthyis_space_timeis_vector_timekey_is_flatkey_is_majorkey_is_minorkey_is_naturalkey_is_sharpkey_n_flatskey_n_sharpskeyslilypondlilypond_rootlilypond_versionlp_chord_idlp_chord_modlyricallyrics_templatemidi_keymidi_metadatamidi_notesmidi_timemidilymiditabmode_aeolianmode_dorianmode_ionianmode_locrianmode_lydianmode_mixolydianmode_modernmode_phrygianmode_rotatemodesmusic_infomusic_keymusic_lyricsmusic_notesmusic_splitmusic_stringsmusic_tempomusic_timemusicaln_beatsn_chordsn_measuresn_notesn_octavesn_stepsnaturalizenotablenotatenote_arpeggiatenote_has_accidentalnote_has_flatnote_has_integernote_has_naturalnote_has_restnote_has_sharpnote_has_ticknote_in_scalenote_is_accidentalnote_is_equalnote_is_flatnote_is_identicalnote_is_integernote_is_naturalnote_is_restnote_is_sharpnote_is_ticknote_ngramnote_rotatenote_set_keynote_shiftnote_slicenote_sortnoteworthynotifyoctave_is_equaloctave_is_identicaloctave_rangeoctave_spanoctave_typeoctavesppcpctphrasephrase_infophrase_notesphrase_stringsphraseypitch_diffpitch_freqpitch_intervalpitch_is_equalpitch_is_identicalpitch_rangepitch_semitonespitch_seqplot_chordplot_fretboardplot_musicplot_music_bassplot_music_bcplot_music_guitarplot_music_tabplot_music_tcpnpretty_notesratio_to_centsread_midirender_chordchartrender_midirender_musicrender_music_bassrender_music_bcrender_music_guitarrender_music_tabrender_music_tcrender_scorerender_tabrestrpscale_chordsscale_chromaticscale_degreescale_diatonicscale_diffscale_harmonic_minorscale_hungarian_minorscale_intervalscale_jazz_minorscale_majorscale_melodic_minorscale_minorscale_notescoresecondsseconds_per_measureseconds_per_stepsemitone_freqsemitone_pitchsemitone_rangesemitone_spansf_notesf_phrasesfnsfpsharpen_flatsimplify_phrasesteps_per_measuresteps_start_timestring_foldstring_unfoldtabtabr_lilypond_apitabr_optionstally_notestally_octavestally_pitchesticks_to_durationtietime_formatto_tabrtptracktrack_basstrack_bctrack_guitartrack_tctrackbindtransposetriplettuning_intervalstupletuntievoltax_11x_13x5x7x7s11x7s5x7s9x9xadd9xaugxdimxdim7xmxMxm11xM11xm13xM13xm6xM6xm7xM7xm7b5xM7s11xm9xM9xma9xs2xs4
Dependencies:clicolorspacecpp11crayondplyrfansifarvergenericsggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixmgcvmunsellnlmepillarpkgconfigpurrrR6RColorBrewerrlangscalesstringistringrtibbletidyrtidyselectutf8vctrsviridisLitewithr
Chord functions
Rendered fromtabr-prog-chords.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-02-23
Musical scales
Rendered fromtabr-prog-scales.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-02-22
Note functions
Rendered fromtabr-prog-notes.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-02-23
Note information
Rendered fromtabr-prog-noteinfo.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-11-16
Noteworthiness
Rendered fromtabr-prog-nw.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-02-22
The music class
Rendered fromtabr-prog-music.Rmd
usingknitr::rmarkdown
on Nov 10 2024.Last update: 2023-09-17
Started: 2019-11-16
Readme and manuals
Help Manual
Help page | Topics |
---|---|
Concatenate and repeat | append_phrases pc pn |
Single note articulations and syntax | articulations |
Noteworthy string to data frame | as_music_df |
Arpeggiate a chord | chord_arpeggiate |
Broken chords | chord_break |
Define chords | chord_def |
Chord inversion | chord_invert |
Check if chords are major or minor | chord_is_major chord_is_minor |
Generate a chord set | chord_set |
Rank, order and sort chords and notes | chord-compare chord_order chord_rank chord_sort |
Extract notes from chords | chord-filter chord_root chord_slice chord_top |
Chord mapping | chord-mapping gc_fretboard gc_info gc_is_known gc_name_mod gc_name_root gc_name_split gc_notes gc_notes_to_fb |
Chord constructors | chords chord_11 chord_13 chord_5 chord_7s11 chord_7s5 chord_7s9 chord_add9 chord_aug chord_dim chord_dim7 chord_dom7 chord_dom9 chord_m7b5 chord_madd9 chord_maj chord_maj11 chord_maj13 chord_maj6 chord_maj7 chord_maj7s11 chord_maj9 chord_min chord_min11 chord_min13 chord_min6 chord_min7 chord_min9 chord_sus2 chord_sus4 x5 x7 x7s11 x7s5 x7s9 x9 xadd9 xaug xdim xdim7 xM xm xM11 xm11 xM13 xm13 xM6 xm6 xM7 xm7 xm7b5 xM7s11 xM9 xm9 xma9 xs2 xs4 x_11 x_13 |
Double bracket methods for tabr classes | double-bracket [[.lyrics [[.music [[.noteinfo [[.noteworthy [[<-.lyrics [[<-.music [[<-.noteinfo [[<-.noteworthy |
Construct a dyad | dyad |
Frequency ratios | freq_ratio |
Predefined guitar chords | guitarChords |
Hammer ons and pull offs | hp |
Interval semitones | interval_semitones |
Interval helpers | intervals pitch_diff pitch_interval scale_diff scale_interval tuning_intervals |
Check if notes and chords are diatonic | is_diatonic |
Key signatures | keys key_is_flat key_is_major key_is_minor key_is_natural key_is_sharp key_n_flats key_n_sharps |
Save score to LilyPond file | lilypond |
LilyPond installation information | lilypond_root lilypond_version tabr_lilypond_api |
LilyPond chord notation | lp_chord_id lp_chord_mod |
Create lyrics and check lyrics string validity | as_lyrics is_lyrics lyrical lyrics lyrics_template |
Main musical intervals | mainIntervals |
Convert MIDI to LilyPond file | midily |
Convert MIDI to tablature | miditab |
Mode helpers | is_mode mode-helpers modes mode_aeolian mode_dorian mode_ionian mode_locrian mode_lydian mode_mixolydian mode_modern mode_phrygian mode_rotate |
Create music objects and check music string validity | as_music is_music music musical music_split |
Accessing music object values and attributes | music-helpers music_info music_key music_lyrics music_notes music_strings music_tempo music_time |
Summarize rhythm and time of music objects | bpm n_beats n_measures seconds seconds_per_measure seconds_per_step steps_per_measure steps_start_time |
Add text to music staff | notate |
Note/chord n-gram | note_ngram |
Slice, sort, rotate, shift and arpeggiate notes | note_arpeggiate note_rotate note_shift note_slice note_sort |
Basic noteworthy string checks | note-checks note_has_accidental note_has_flat note_has_natural note_has_sharp note_is_accidental note_is_flat note_is_natural note_is_sharp |
Basic noteworthy strings formatting and coercion helpers | as_integer_octaves as_space_time as_tick_octaves as_vector_time flatten_sharp naturalize note-coerce note_set_key pretty_notes sharpen_flat |
Note, pitch and chord equivalence | note-equivalence note_is_equal note_is_identical octave_is_equal octave_is_identical pitch_is_equal pitch_is_identical |
Relational operators for noteworthy class | !=.noteworthy <.noteworthy <=.noteworthy ==.noteworthy >.noteworthy >=.noteworthy note-logic |
Noteworthy string metadata | accidental_type chord_size is_space_time is_vector_time note-metadata note_has_integer note_has_rest note_has_tick note_is_integer note_is_rest note_is_tick n_chords n_notes n_octaves n_steps octave_type time_format |
Noteworthy string summaries | distinct_notes distinct_octaves distinct_pitches note-summaries octaves octave_range octave_span pitch_range semitone_range semitone_span tally_notes tally_octaves tally_pitches |
Note info helpers | info_annotation info_articulation info_bend info_dotted info_double_dotted info_duration info_single_dotted info_slide info_slur_off info_slur_on noteinfo |
Create a musical phrase | p phrase |
Phrase validation and coercion | as_phrase notable notify phrase-checks phrasey phrase_info phrase_notes phrase_strings |
Pitch conversions | chord_freq chord_semitones freq_pitch freq_semitones pitch_freq pitch_semitones semitone_freq semitone_pitch |
Create a sequence from pitch notation | pitch_seq |
Chord and fretboard diagram plots | plot_chord plot_fretboard |
Plot sheet music snippet with LilyPond | plot_music plot_music_bass plot_music_bc plot_music_guitar plot_music_tab plot_music_tc |
Convert between chord frequency ratios and cents | cents_to_ratio ratio_to_cents |
Read, inspect and convert MIDI file contents | duration_to_ticks midi_key midi_metadata midi_notes midi_time read_midi ticks_to_duration |
Render a chord chart with LilyPond | render_chordchart |
Render sheet music snippet with LilyPond | render_music render_music_bass render_music_bc render_music_guitar render_music_tab render_music_tc |
Repeat phrases | pct repeats rp volta |
Create rests | rest |
Diatonic chords | scale_chords |
Scale degrees and mappings | chord_degree is_in_scale note_in_scale scale-deg scale_degree scale_note |
Scale helpers | scale-helpers scale_chromatic scale_diatonic scale_harmonic_minor scale_hungarian_minor scale_jazz_minor scale_major scale_melodic_minor scale_minor |
Create a music score | score |
Create a musical phrase from string/fret combinations | sfn sfp sf_note sf_phrase |
Simplify the LilyPond syntax of a phrase | simplify_phrase |
Single bracket methods for tabr classes | single-bracket [.lyrics [.music [.noteinfo [.noteworthy [<-.lyrics [<-.music [<-.noteinfo [<-.noteworthy |
Fold and unfold strings | string_fold string_unfold |
Render sheet music with LilyPond | render_midi render_score render_tab tab |
tabr: Music Notation Syntax, Manipulation, Analysis and Transcription in R | tabr-package tabr |
Options | tabr_options |
Concatenate for tabr classes | c.lyrics c.music c.noteinfo c.noteworthy c.phrase tabr-c |
tabr: Additional Detals | tabr-details |
Head and tail for tabr classes | head.lyrics head.music head.noteinfo head.noteworthy tabr-head tail.lyrics tail.music tail.noteinfo tail.noteworthy |
Length for tabr classes | length.lyrics length.music length.noteinfo length.noteworthy tabr-length |
Summary of implemented S3 generic methods | tabr-methods |
Repeat for tabr classes | rep.lyrics rep.music rep.noteinfo rep.noteworthy rep.phrase tabr-rep |
Reverse for tabr classes | rev.lyrics rev.music rev.noteinfo rev.noteworthy tabr-rev |
tabr syntax | tabrSyntax |
Tied notes | tie untie |
Music notation syntax converters | from_chorrrds from_music21 to_tabr |
Create a music track | track track_bass track_bc track_guitar track_tc |
Bind track tables | trackbind |
Transpose pitch | tp transpose |
Predefined instrument tunings | tunings |
Tuplets | triplet tuplet |
Check note info validity | as_noteinfo informable is_noteinfo valid-noteinfo |
Check note and chord validity | as_noteworthy is_chord is_note is_noteworthy noteworthy valid-notes |