Domanda

Sto scrivendo una breve parte anteriore per visualizzare la tablatura della chitarra.Il front-end è in flash ma voglio memorizzare la linguetta in qualche formato leggibile dall'uomo.Qualcuno sa di qualcosa che esiste già?Qualche suggerimento su come farlo?Un'idea di cui ho letto alcuni post di Stackoverflow è stato quello di usare un rigoroso formato di tabulazione ASCII come:

e||-1------3--------------0--|----2-------0---
B||--1-----3------------1----|----3-------0---
G||---2----0----------0------|----2-------1---
D||----3---0--------2--------|----0-------2---
A||----3---2------3----------|------------2---
E||----1---3----3------------|------------0---
.

ha vantaggi.Posso guadagnare un sacco di informazioni dalla struttura (quante corde, le loro accordature, il relativo posizionamento delle note) ma è un po 'verboso.Immagino che il '-' si comprometterà abbastanza bene quando ha inviato il filo.

Se qualcuno conosce un formato di dati esistente per descrivere la scheda della chitarra, darò uno sguardo.

Modifica:

Devo notare che questo formato è del 90% per me e potrebbe non essere mai visto da nessuno diverso da me stesso.Voglio un modo semplice per scrivere file di schede che verranno visualizzati alla fine come grafica in un front-end flash e non voglio dover scrivere un editor front-end.

È stato utile?

Soluzione

Dai un'occhiata a scheda ASCII formato.Anche una grande descrizione del formato è qui:

http://www.howtoreadguitArtabs.net/

 Guitar Tab Tab Descrizione del formato (di HowtoReadGuitArtabs.net)

Altri suggerimenti

ASCII Export sarebbe una grande caratteristica, ma usare ASCII come formato interno dei dati non è una buona idea.Ad esempio, le durate della nota sarebbero estremamente difficili da esprimere (Hou consiglieresti 32nds o anche 16s?, Per non parlare di terzite ...), quindi analizzare quei file sarebbe estremamente difficile.Inoltre, gli utenti sarebbero tentati di caricare i file ASCII creati al di fuori della tua app, che probabilmente avrà fallito.

Per riassumere, consiglierei di provare a riutilizzare il formato esistente o inventare il tuo se non è fattibile.Potresti provare a usare XML per questo.

Modifica: accanto a DGuitar, conosco TuxGuitar e Kguitar, che supportano i file Guitar Pro.Puoi esaminare le loro fonti o chiedere ai loro autori sui formati di file.Penso che ci sia anche un convertitore open source PowerTab-to-ASCII.

Vedi Formati di file supportati in tuxguitar .

TuxGuitar è il software multiplatform open source per la lettura, la scrittura e la riproduzione delle schede della chitarra. .

Supporta il nome Guitar Pro e PowerTab , e ha anche il suo formato TuxGuitar (.tg).

If you need the backend data structure to remain in human readable form I would probably stick it in a CDATA inside of XML. That could be inserted into a relational database with song/artist/title information and become searchable. Another option is to save it as zipped text files and insert links to those files in a database with the main artist info still searchable by sql.

These are not human readable:

Most common formats are Guitar Pro (proprietary) and PowerTab (freeware). DGuitar and TuxGuitar are open source viewers for Guitar Pro format. I'm sure that they have documentation for the format somewhere (at least in the code).

Advantage for using a common format would be the easiness of making tabs with those programs.

The Guitar Pro 4 format is described here http://dguitar.sourceforge.net/GP4format.html

I wrote a quick utility for displaying tab. For personal use. You can happily take the internal format I used.

I use a very simple string based format. There are three important structures.

Column, a vertical column in the output tab - all notes played simultaneously. Bar, a collection of Columns Motif, a collection of Bars

A Column looks like ':#|:#|*:#' where each * is a string number and each # is a fret number. If you are playing a chord you separate each string:fret with a '|'

A Bar looks like '[,,-,*]' where each * is a Column. A - indicates an empty column where no notes are played.

A Motif looks is just many Bars running back to back. For instance

"[1:5,-,3:7,-,3:5,-,3:7,-,-,3:5,3:7,-,1:8,-,1:5]"

    e||---------------|---------------||
    B||---------------|---------------||
    G||---------------|---------------||
    D||--7-5-7--57----|--7-5-7--57----||
    A||---------------|---------------||
    E||5-----------8-5|5-----------8-5||


"[-,-,1:3|2:2|3:0|4:0|5:3|6:3,-,-][-,-,3:0|4:2|5:3|6:2,-,-]"

   e||--3--|--2--||
   B||--3--|--3--||
   G||--0--|--2--||
   D||--0--|--0--||
   A||--2--|-----||
   E||--3--|-----||
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top