The Inbox: Sound-ct.69.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

The Inbox: Sound-ct.69.mcz

commits-2
A new version of Sound was added to project The Inbox:
http://source.squeak.org/inbox/Sound-ct.69.mcz

==================== Summary ====================

Name: Sound-ct.69
Author: ct
Time: 1 October 2019, 8:25:38.912339 pm
UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
Ancestors: Sound-eem.66

Add convenience setter for MIDIScore

These values are strongly related and should in most cases be set at once.

=============== Diff against Sound-eem.66 ===============

Item was changed:
  ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
  asScore
 
  ^ MIDIScore new
+ tracks: tracks trackInfo: trackInfo;
- tracks: tracks;
- trackInfo: trackInfo;
  tempoMap: tempoMap;
  ticksPerQuarterNote: ticksPerQuarter;
  source: stream localName
  !

Item was added:
+ ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
+ tracks: trackList trackInfo: trackInfoList
+
+ self tracks: trackList; trackInfo: trackInfoList.!


Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Sound-ct.69.mcz

Tobias Pape
Hi

I don't understand the rationale here.
Care to explain?
What's so different with the "dual" setter?
Best regards
        -Tobias

> On 01.10.2019, at 20:25, [hidden email] wrote:
>
> A new version of Sound was added to project The Inbox:
> http://source.squeak.org/inbox/Sound-ct.69.mcz
>
> ==================== Summary ====================
>
> Name: Sound-ct.69
> Author: ct
> Time: 1 October 2019, 8:25:38.912339 pm
> UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> Ancestors: Sound-eem.66
>
> Add convenience setter for MIDIScore
>
> These values are strongly related and should in most cases be set at once.
>
> =============== Diff against Sound-eem.66 ===============
>
> Item was changed:
>  ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
>  asScore
>
>   ^ MIDIScore new
> + tracks: tracks trackInfo: trackInfo;
> - tracks: tracks;
> - trackInfo: trackInfo;
>   tempoMap: tempoMap;
>   ticksPerQuarterNote: ticksPerQuarter;
>   source: stream localName
>  !
>
> Item was added:
> + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> + tracks: trackList trackInfo: trackInfoList
> +
> + self tracks: trackList; trackInfo: trackInfoList.!
>
>



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Sound-ct.69.mcz

Christoph Thiede

Hi,


No special reason. Each trackInfo item describes one tracks item, so I thought it could be a good idea to set them at once. Equal to #setString:setRuns: or #real:imaginary:, for example.

If you don't think it improves code quality, I can abstain from it. :)


Best,

Christoph


Von: Squeak-dev <[hidden email]> im Auftrag von Tobias Pape <[hidden email]>
Gesendet: Dienstag, 1. Oktober 2019 20:58:49
An: [hidden email]
Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
 
Hi

I don't understand the rationale here.
Care to explain?
What's so different with the "dual" setter?
Best regards
        -Tobias
> On 01.10.2019, at 20:25, [hidden email] wrote:
>
> A new version of Sound was added to project The Inbox:
> http://source.squeak.org/inbox/Sound-ct.69.mcz
>
> ==================== Summary ====================
>
> Name: Sound-ct.69
> Author: ct
> Time: 1 October 2019, 8:25:38.912339 pm
> UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> Ancestors: Sound-eem.66
>
> Add convenience setter for MIDIScore
>
> These values are strongly related and should in most cases be set at once.
>
> =============== Diff against Sound-eem.66 ===============
>
> Item was changed:
>  ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
>  asScore
>
>        ^ MIDIScore new
> +              tracks: tracks trackInfo: trackInfo;
> -              tracks: tracks;
> -              trackInfo: trackInfo;
>                tempoMap: tempoMap;
>                ticksPerQuarterNote: ticksPerQuarter;
>                source: stream localName
>  !
>
> Item was added:
> + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> + tracks: trackList trackInfo: trackInfoList
> +
> +      self tracks: trackList; trackInfo: trackInfoList.!
>
>





Carpe Squeak!
Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Sound-ct.69.mcz

Tobias Pape

> On 01.10.2019, at 21:49, Thiede, Christoph <[hidden email]> wrote:
>
> Hi,
>
> No special reason. Each trackInfo item describes one tracks item, so I thought it could be a good idea to set them at once. Equal to #setString:setRuns: or #real:imaginary:, for example.

I see your point. However, these two are more private (as most #set… are). The one for Complex could be even thought of as primitive and maybe this method shouldn't be necessary conceptually.

> If you don't think it improves code quality, I can abstain from it. :)

No problem, I was just wondering.
In cases where you want to communicate the _caller_ that something should be thought of as a unit, I would probably make a class-side convenience constructor.

Keep it coming :D

Best regards
        -Tobias

>
> Best,
> Christoph
> Von: Squeak-dev <[hidden email]> im Auftrag von Tobias Pape <[hidden email]>
> Gesendet: Dienstag, 1. Oktober 2019 20:58:49
> An: [hidden email]
> Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
>  
> Hi
>
> I don't understand the rationale here.
> Care to explain?
> What's so different with the "dual" setter?
> Best regards
>         -Tobias
> > On 01.10.2019, at 20:25, [hidden email] wrote:
> >
> > A new version of Sound was added to project The Inbox:
> > http://source.squeak.org/inbox/Sound-ct.69.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Sound-ct.69
> > Author: ct
> > Time: 1 October 2019, 8:25:38.912339 pm
> > UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> > Ancestors: Sound-eem.66
> >
> > Add convenience setter for MIDIScore
> >
> > These values are strongly related and should in most cases be set at once.
> >
> > =============== Diff against Sound-eem.66 ===============
> >
> > Item was changed:
> >  ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
> >  asScore
> >
> >        ^ MIDIScore new
> > +              tracks: tracks trackInfo: trackInfo;
> > -              tracks: tracks;
> > -              trackInfo: trackInfo;
> >                tempoMap: tempoMap;
> >                ticksPerQuarterNote: ticksPerQuarter;
> >                source: stream localName
> >  !
> >
> > Item was added:
> > + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> > + tracks: trackList trackInfo: trackInfoList
> > +
> > +      self tracks: trackList; trackInfo: trackInfoList.!
> >
> >



Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Sound-ct.69.mcz

marcel.taeumel
This only makes sense if both are required to construct a meaningful object. Just for convenience, it wouldn't add anything. #setString:setRuns: for Text is such a meaningful combination.

-1 :-)

Best,
Marcel

Am 01.10.2019 22:02:03 schrieb Tobias Pape <[hidden email]>:


> On 01.10.2019, at 21:49, Thiede, Christoph wrote:
>
> Hi,
>
> No special reason. Each trackInfo item describes one tracks item, so I thought it could be a good idea to set them at once. Equal to #setString:setRuns: or #real:imaginary:, for example.

I see your point. However, these two are more private (as most #set… are). The one for Complex could be even thought of as primitive and maybe this method shouldn't be necessary conceptually.

> If you don't think it improves code quality, I can abstain from it. :)

No problem, I was just wondering.
In cases where you want to communicate the _caller_ that something should be thought of as a unit, I would probably make a class-side convenience constructor.

Keep it coming :D

Best regards
-Tobias

>
> Best,
> Christoph
> Von: Squeak-dev im Auftrag von Tobias Pape
> Gesendet: Dienstag, 1. Oktober 2019 20:58:49
> An: [hidden email]
> Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
>
> Hi
>
> I don't understand the rationale here.
> Care to explain?
> What's so different with the "dual" setter?
> Best regards
> -Tobias
> > On 01.10.2019, at 20:25, [hidden email] wrote:
> >
> > A new version of Sound was added to project The Inbox:
> > http://source.squeak.org/inbox/Sound-ct.69.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Sound-ct.69
> > Author: ct
> > Time: 1 October 2019, 8:25:38.912339 pm
> > UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> > Ancestors: Sound-eem.66
> >
> > Add convenience setter for MIDIScore
> >
> > These values are strongly related and should in most cases be set at once.
> >
> > =============== Diff against Sound-eem.66 ===============
> >
> > Item was changed:
> > ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
> > asScore
> >
> > ^ MIDIScore new
> > + tracks: tracks trackInfo: trackInfo;
> > - tracks: tracks;
> > - trackInfo: trackInfo;
> > tempoMap: tempoMap;
> > ticksPerQuarterNote: ticksPerQuarter;
> > source: stream localName
> > !
> >
> > Item was added:
> > + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> > + tracks: trackList trackInfo: trackInfoList
> > +
> > + self tracks: trackList; trackInfo: trackInfoList.!
> >
> >





Reply | Threaded
Open this post in threaded view
|

Re: The Inbox: Sound-ct.69.mcz

Christoph Thiede

Okay, then discard the proposal :)

Or can I move it to the Treated Inbox myself?


Von: Squeak-dev <[hidden email]> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 2. Oktober 2019 08:47:38
An: Alan Grimes via Squeak-dev
Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
 
This only makes sense if both are required to construct a meaningful object. Just for convenience, it wouldn't add anything. #setString:setRuns: for Text is such a meaningful combination.

-1 :-)

Best,
Marcel

Am 01.10.2019 22:02:03 schrieb Tobias Pape <[hidden email]>:


> On 01.10.2019, at 21:49, Thiede, Christoph wrote:
>
> Hi,
>
> No special reason. Each trackInfo item describes one tracks item, so I thought it could be a good idea to set them at once. Equal to #setString:setRuns: or #real:imaginary:, for example.

I see your point. However, these two are more private (as most #set… are). The one for Complex could be even thought of as primitive and maybe this method shouldn't be necessary conceptually.

> If you don't think it improves code quality, I can abstain from it. :)

No problem, I was just wondering.
In cases where you want to communicate the _caller_ that something should be thought of as a unit, I would probably make a class-side convenience constructor.

Keep it coming :D

Best regards
-Tobias

>
> Best,
> Christoph
> Von: Squeak-dev im Auftrag von Tobias Pape
> Gesendet: Dienstag, 1. Oktober 2019 20:58:49
> An: [hidden email]
> Betreff: Re: [squeak-dev] The Inbox: Sound-ct.69.mcz
>
> Hi
>
> I don't understand the rationale here.
> Care to explain?
> What's so different with the "dual" setter?
> Best regards
> -Tobias
> > On 01.10.2019, at 20:25, [hidden email] wrote:
> >
> > A new version of Sound was added to project The Inbox:
> > http://source.squeak.org/inbox/Sound-ct.69.mcz
> >
> > ==================== Summary ====================
> >
> > Name: Sound-ct.69
> > Author: ct
> > Time: 1 October 2019, 8:25:38.912339 pm
> > UUID: b0d38e4d-1231-494f-8502-e1a631e232b3
> > Ancestors: Sound-eem.66
> >
> > Add convenience setter for MIDIScore
> >
> > These values are strongly related and should in most cases be set at once.
> >
> > =============== Diff against Sound-eem.66 ===============
> >
> > Item was changed:
> > ----- Method: MIDIFileReader>>asScore (in category 'chunk reading') -----
> > asScore
> >
> > ^ MIDIScore new
> > + tracks: tracks trackInfo: trackInfo;
> > - tracks: tracks;
> > - trackInfo: trackInfo;
> > tempoMap: tempoMap;
> > ticksPerQuarterNote: ticksPerQuarter;
> > source: stream localName
> > !
> >
> > Item was added:
> > + ----- Method: MIDIScore>>tracks:trackInfo: (in category 'accessing') -----
> > + tracks: trackList trackInfo: trackInfoList
> > +
> > + self tracks: trackList; trackInfo: trackInfoList.!
> >
> >





Carpe Squeak!