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:Matthew Leonawicz [aut, cre]

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'))

Peer review:

Bug tracker:https://github.com/leonawicz/tabr/issues

Datasets:

On CRAN:

guitar-tablaturelilypondlilypond-apimusic-analysismusic-datamusic-notationmusic-programmingmusic-syntaxmusic-transcriptionsheet-music

7.86 score 127 stars 94 scripts 344 downloads 306 exports 37 dependencies

Last updated 2 months agofrom:ed3a06ce2b. Checks:OK: 7. Indexed: yes.

TargetResultDate
Doc / VignettesOKNov 10 2024
R-4.5-winOKNov 10 2024
R-4.5-linuxOKNov 10 2024
R-4.4-winOKNov 10 2024
R-4.4-macOKNov 10 2024
R-4.3-winOKNov 10 2024
R-4.3-macOKNov 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.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-02-23

Musical scales

Rendered fromtabr-prog-scales.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-02-22

Note functions

Rendered fromtabr-prog-notes.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-02-23

Note information

Rendered fromtabr-prog-noteinfo.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-11-16

Noteworthiness

Rendered fromtabr-prog-nw.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-02-22

The music class

Rendered fromtabr-prog-music.Rmdusingknitr::rmarkdownon Nov 10 2024.

Last update: 2023-09-17
Started: 2019-11-16

Readme and manuals

Help Manual

Help pageTopics
Concatenate and repeatappend_phrases pc pn
Single note articulations and syntaxarticulations
Noteworthy string to data frameas_music_df
Arpeggiate a chordchord_arpeggiate
Broken chordschord_break
Define chordschord_def
Chord inversionchord_invert
Check if chords are major or minorchord_is_major chord_is_minor
Generate a chord setchord_set
Rank, order and sort chords and noteschord-compare chord_order chord_rank chord_sort
Extract notes from chordschord-filter chord_root chord_slice chord_top
Chord mappingchord-mapping gc_fretboard gc_info gc_is_known gc_name_mod gc_name_root gc_name_split gc_notes gc_notes_to_fb
Chord constructorschords 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 classesdouble-bracket [[.lyrics [[.music [[.noteinfo [[.noteworthy [[<-.lyrics [[<-.music [[<-.noteinfo [[<-.noteworthy
Construct a dyaddyad
Frequency ratiosfreq_ratio
Predefined guitar chordsguitarChords
Hammer ons and pull offshp
Interval semitonesinterval_semitones
Interval helpersintervals pitch_diff pitch_interval scale_diff scale_interval tuning_intervals
Check if notes and chords are diatonicis_diatonic
Key signatureskeys 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 filelilypond
LilyPond installation informationlilypond_root lilypond_version tabr_lilypond_api
LilyPond chord notationlp_chord_id lp_chord_mod
Create lyrics and check lyrics string validityas_lyrics is_lyrics lyrical lyrics lyrics_template
Main musical intervalsmainIntervals
Convert MIDI to LilyPond filemidily
Convert MIDI to tablaturemiditab
Mode helpersis_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 validityas_music is_music music musical music_split
Accessing music object values and attributesmusic-helpers music_info music_key music_lyrics music_notes music_strings music_tempo music_time
Summarize rhythm and time of music objectsbpm n_beats n_measures seconds seconds_per_measure seconds_per_step steps_per_measure steps_start_time
Add text to music staffnotate
Note/chord n-gramnote_ngram
Slice, sort, rotate, shift and arpeggiate notesnote_arpeggiate note_rotate note_shift note_slice note_sort
Basic noteworthy string checksnote-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 helpersas_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 equivalencenote-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 metadataaccidental_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 summariesdistinct_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 helpersinfo_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 phrasep phrase
Phrase validation and coercionas_phrase notable notify phrase-checks phrasey phrase_info phrase_notes phrase_strings
Pitch conversionschord_freq chord_semitones freq_pitch freq_semitones pitch_freq pitch_semitones semitone_freq semitone_pitch
Create a sequence from pitch notationpitch_seq
Chord and fretboard diagram plotsplot_chord plot_fretboard
Plot sheet music snippet with LilyPondplot_music plot_music_bass plot_music_bc plot_music_guitar plot_music_tab plot_music_tc
Convert between chord frequency ratios and centscents_to_ratio ratio_to_cents
Read, inspect and convert MIDI file contentsduration_to_ticks midi_key midi_metadata midi_notes midi_time read_midi ticks_to_duration
Render a chord chart with LilyPondrender_chordchart
Render sheet music snippet with LilyPondrender_music render_music_bass render_music_bc render_music_guitar render_music_tab render_music_tc
Repeat phrasespct repeats rp volta
Create restsrest
Diatonic chordsscale_chords
Scale degrees and mappingschord_degree is_in_scale note_in_scale scale-deg scale_degree scale_note
Scale helpersscale-helpers scale_chromatic scale_diatonic scale_harmonic_minor scale_hungarian_minor scale_jazz_minor scale_major scale_melodic_minor scale_minor
Create a music scorescore
Create a musical phrase from string/fret combinationssfn sfp sf_note sf_phrase
Simplify the LilyPond syntax of a phrasesimplify_phrase
Single bracket methods for tabr classessingle-bracket [.lyrics [.music [.noteinfo [.noteworthy [<-.lyrics [<-.music [<-.noteinfo [<-.noteworthy
Fold and unfold stringsstring_fold string_unfold
Render sheet music with LilyPondrender_midi render_score render_tab tab
tabr: Music Notation Syntax, Manipulation, Analysis and Transcription in Rtabr-package tabr
Optionstabr_options
Concatenate for tabr classesc.lyrics c.music c.noteinfo c.noteworthy c.phrase tabr-c
tabr: Additional Detalstabr-details
Head and tail for tabr classeshead.lyrics head.music head.noteinfo head.noteworthy tabr-head tail.lyrics tail.music tail.noteinfo tail.noteworthy
Length for tabr classeslength.lyrics length.music length.noteinfo length.noteworthy tabr-length
Summary of implemented S3 generic methodstabr-methods
Repeat for tabr classesrep.lyrics rep.music rep.noteinfo rep.noteworthy rep.phrase tabr-rep
Reverse for tabr classesrev.lyrics rev.music rev.noteinfo rev.noteworthy tabr-rev
tabr syntaxtabrSyntax
Tied notestie untie
Music notation syntax convertersfrom_chorrrds from_music21 to_tabr
Create a music tracktrack track_bass track_bc track_guitar track_tc
Bind track tablestrackbind
Transpose pitchtp transpose
Predefined instrument tuningstunings
Tupletstriplet tuplet
Check note info validityas_noteinfo informable is_noteinfo valid-noteinfo
Check note and chord validityas_noteworthy is_chord is_note is_noteworthy noteworthy valid-notes